Forum Discussion
Understood.
I managed to get Fiddler working and configured and captured both.
The RAW header and response from Chrome:
GET https://api.mailinator.com/api/inbox?to=?%40mailinator.com&token=?&private_domain=true%20HTTP/1.1 HTTP/1.1
Host: api.mailinator.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: __cfduid=d421be177b21122fcffa7164759d88f5c1547666655; JSESSIONID=s4~04C12A0D78A5976B550B2F01D68403D8
HTTP/1.1 200
Date: Fri, 01 Mar 2019 21:56:54 GMT
Content-Type: application/json;charset=ISO-8859-1
Connection: keep-alive
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 4b0e623178026c4c-SJC
Content-Length: 344
{"messages":[{"fromfull":"leviosa@pivotal.io","subject":"Verify your account","from":"leviosa@pivotal.io","origfrom":"leviosa@pivotal.io","to”:”?”,”id”:”?”,”time":1551460931000,"seconds_ago":16483}],"to”:”?”}
The Raw header and response from ReadyAPI!:
GET https://api.mailinator.com/api/inbox?to=?%40mailinator.com&token=?&private_domain=true HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Length: 0
Host: api.mailinator.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_181)
HTTP/1.1 200
Date: Fri, 01 Mar 2019 22:06:41 GMT
Content-Type: application/json;charset=ISO-8859-1
Connection: keep-alive
Set-Cookie: __cfduid=d49121eb87460e82b00850caa8f6a751f1551478001; expires=Sat, 29-Feb-20 22:06:41 GMT; path=/; domain=.mailinator.com; HttpOnly
Set-Cookie: JSESSIONID=s4~B16B7590F17159CAAC26D55C4EAEC8BB; Path=/; HttpOnly
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 4b0e70841e9c6c22-SJC
Content-Length: 63
{"messages":[],"to":"?"}
Hey Lightem
OK - can you do me a favour please?
Can you reconfirm the URI you are passing - according to the details below you are passing slightly different requests in browser compared wiht ReadyAPI!
Browser:
GET https://api.mailinator.com/api/inbox?to=?%40mailinator.com&token=?&private_domain=true%20HTTP/1.1
ReadyAPI!:
GET https://api.mailinator.com/api/inbox?to=?%40mailinator.com&token=?&private_domain=true
So currently it actualy looks like you are posting 'HTTP/1.1' in the end of the request your are submitting in your browser. I don't think it'sa typo - cos you wouldve just copied out of fiddler - but it's weird and different to ReadyAPI! so we need to clarify
Depending on your response to the above - I have an idea about your issue.
Can you submit the same request in POSTMAN please? Rather than the browser - I want to see what gets generated in Fiddler from a REST client tool - rather than just a browser.
Essentially the proxying requests via Fiddler has confirmed that the issue wasn't ReadyAPI!s rendering of the response (cos ReadyAPI! can alter the response rendered in the results) - but Fiddler proved that the message array in your response payload is empty BEFORE it gets to ReadyAPI! - so ReadyAPI! is simply displaying the content it receives - I just needed to be sure.
Next - do the same again - but this time with a REST client like POSTMAN - I need to see what headers are actually being generated and the messages array in the payload for a REST client (other than ReadyAPI!)
Depending on the results - we might need to add in some headers to your ReadyAPI! request - I wouldn't expect the headers to alter the payload like this - but that's the only thing I can think of - emulate the request via the browser (or POSTMAN dependinng on the results) and go from there.
Have you spoken to your developers? Have they confirmed if there are header parameters required on this GET?
Cheers!
richie
If you
zx