Forum Discussion
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
- Lightem6 years agoOccasional Contributor
"Have you spoken to your developers? Have they confirmed if there are header parameters required on this GET?"
This is Mailinators' API
Thank you for your suggestions. Regardless of source, the only change in all of the manipulations to call that has made a difference is how the HTTP/1.1 is appended to the end of the call.
Logs from Fiddler show that the format that does work is to end the URL with:
...&private_domain=true%20HTTP/1.1 HTTP/1.1
The calls leaving the body of the message black end in
...&private_domain=true HTTP/1.1
The problem I am having dealing with this knowledge is trying to manipulate ReadyAPI to behave in the same way. I have tried to stitch this "additional" HTTP non-header, header into the URL from ReadyAPI to no avail.
- richie6 years agoCommunity Hero
Hey Lightem
So it's a 3rd party API? Ok - we'll get to that
In all your posts (except the first one) you say you submit the following in chrome:
https://api.mailinator.com/api/inbox?to=?%40mailinator.com&token=?&private_domain=true%20HTTP/1.1
What made you append the ' HTTP/1.1' at the end of the query string when you submitted the request in Chrome?
Initially you stated in your first post that you wanted to NOT send the 'HTTP/1.1' at the end of your request? (confused!)
Anyway - yeah - what made you append the HTTP/1.1 at the end of the query string when you submitted via Chrome?
If you don't append the HTTP/1.1 at the end of the request in Chrome - what happens? Do you still get a populated messages array in your response payload - or is it empty as well? I don't see from the previous posts what you say about this - but this is important
I've had a look at the API detail at mailinators apidocs and it does NOT mention appending the HTTP/1.1 at the end of the request at all for any of the api calls including your query of the private domain which you are exercising. According to the detail - I would expect appending HTTP/1.1 to your query string to fail according to the api definitions in the apidocs.jsp page.
Also - It doesn't make sense - sticking HTTP/1.1 at the end of the request doesn't even comply to good RESTful API URI design which is probably one of the reasons you're struggling to configure ReadyAPI to support adding it into your query string
Can you please respond with the response you get when you submit the following URL into Chrome please? (is the messsages array in yoru response payload populated when you do this?)
https://api.mailinator.com/api/inbox?to=?%40mailinator.com&token=?&private_domain=true
Cheers,
richie
- Lightem6 years agoOccasional Contributor
I saw the same on Mailinators' docs as well and I have no idea why it needs to work the way is does.
I did find a horrible, ugly solution to my problem, shown in the screenshot.
I added the HTTP/1.1 to the domain value and the entirety of the messege came across.
The scary part. The final URL
...domain=true%20HTTP%2F1.1 HTTP/1.1
I have no idea why this would even be accepted as a valid request.
Related Content
- 3 years agoAAB
- 5 years agovikassardesai