Tag: rest client

发送RESTClient Firefox POST并在node.js中尝试相同的操作

我用FireFoxrest客户端发送以下post: POST /WSPublic.asmx HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 462 Host: host Connection: close <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"><soap12:Body><ContadoresTR xmlns="https://xxxxx"><Usuario>user</Usuario><Contrasena>password</Contrasena><NInstalacion>inst</NInstalacion><VersionFicheroEsperado>1</VersionFicheroEsperado></ContadoresTR></soap12:Body></soap12:Envelope> 它的工作原理,我收到服务器的响应。 在Wireshark对话中,我看到RESTClient首先发送以下stream: ………..fe….0..S…. ..L0g….!…zP _….N.im3….8.q.'…6.9…..p>. .+./. ………..3.2.9./.5. …….c…….. ges.leako.com…… ……………..#..3t…..!…h2-14.spdy/3.1.spdy/3.http/1.1……… 然后我尝试使用node.js来做同样的事情。 HTTP客户端发送相同的post,我没有收到服务器的响应。 看着Wireshark对话,我看到第一个HTTP Clientstream的格式与firefox的RESTClient不同。 POST /WSPublic.asmx HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 462 Host: host Connection: close <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"><soap12:Body><ContadoresTR xmlns="https://xxxxxx"><Usuario>user</Usuario><Contrasena>password</Contrasena><NInstalacion>inst</NInstalacion><VersionFicheroEsperado>1</VersionFicheroEsperado></ContadoresTR></soap12:Body></soap12:Envelope> […]