Forum Discussion

dushivakiran's avatar
dushivakiran
New Contributor
8 years ago

how to handle "X-powered by - Express" in SOAPUI response when running a REST API?

When trying to communicate to device connected over WIFI via a REST API call, getting the below response.

Sample Request:

POST http://192.168.11.9:8088/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 51
Host: 192.168.11.9:8088
Proxy-Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

{"id":123456,"cmd":"connect.ping","timeout":5000}

 

Response:

HTTP/1.1 500 Fiddler - Bad Response
Date: Mon, 31 Oct 2016 12:54:55 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: no-cache, must-revalidate
Timestamp: 18:24:55.893

[Fiddler] Response Header parsing failed.
Response Data:
<plaintext>
48 54 54 50 2F 31 2E 31 20 4D 69 73 73 69 6E 67 20 6F 72 20 69 6E 76 61 HTTP/1.1 Missing or inva
6C 69 64 20 4F 72 69 67 69 6E 20 68 65 61 64 65 72 0D 0A 43 6F 6E 74 65 lid Origin header..Conte
6E 74 2D 4C 65 6E 67 74 68 3A 20 30 0D 0A 0D 0A nt-Length: 0....

 

But on checking the Chrome developers tool for the same request it is working fine and returning the below response.

 

Access-Control-Allow-Headers:origin, content-type, accept
Access-Control-Allow-Method:POST, OPTIONS
Access-Control-Allow-Origin:http://test.abc.com
Connection:close
Content-Length:319
Content-Type:application/json; charset=utf-8
Date:Mon, 31 Oct 2016 11:42:04 GMT
X-Powered-By:Express

 

{"id":123456,"msg":"OK","Message": "Success"}

 

Please help in understanding the above and how SOAPUI can be used to handle this.

No RepliesBe the first to reply