我有一个服务要消费,服务的细节如下。
POST /API/v02/JsonWs.svc/json/V02 HTTP/1.1 [OR] POST /API/Public/v02/JsonWs.svc/json/V02 HTTP/1.1
Host: dev.domain.us
Content-Type: application/json; charset=utf-8
Cookie: LogicAuth=3821F201156EA833......; path=/; HttpOnly
{"Header":{"Procedure":"Family_Insert"},"Body":{"EmailAddress":"email22222@domain.net","Password":"test14","IdPhoneNumber":3051234567,"Address":{"Line1":"1234 Avenue","Line2":"Suite 900","City":"Coral","ZipCode":"33327","State":{"IdState":10}},"TimeZone":{"IdTimeZone":-5},"User":{"IdGender":1,"NameFirst":"Tom","NameMiddle":"Larry","NameLast":"Lewis","DateBirth":"10-21-1978","ClubName":"ABC","Communities":[1,2],"UserConnectTypes":[3,4]}}}
要从以下位置启动的 javascript 代码:
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", "/json-handler");
xmlhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
在您的回答中,您不必使用所有变量,我只需要一些帮助才能让我继续前进......
编辑:请指定在我设置请求标头后如何将 json 数据发送到服务器的后续步骤xmlhttp
。我不确定将数据发送到上述服务的 URL。
有人可以告诉我如何在 chrome postman 中测试上述服务吗?