Optum / mockiato

A web-based platform for API virtualization
Apache License 2.0
24 stars 9 forks source link

Rest Client Obs3: Getting response for the improper request after updating a GET Service (TS3) #590

Open pkotha5 opened 4 years ago

pkotha5 commented 4 years ago

Steps : 1. Create a service with POST RR, GET RR Pair

  1. Blank out Request payload and Uncheck “Add Request Payload for GET” in the GET method
    1. Click on “update” 4.Open REST Client and give GET Request Payload , Click on “Send”

Actual Result : Getting response here.

Pradeep298 commented 4 years ago

Yes you should get response here. There is no issue and this is fine. With get request it doesn't matter what body or headers you set with request. Get HTTP request only need an api url. You will always get the response. That's it. If you test same scenario with POSTMAN or any other client. Get request will always give you a response irrespective of header or request payload.

Please check below answer by Paul Morgan https://stackoverflow.com/questions/978061/http-get-with-request-body

Request body in Get HTTP request has no semantic meaning to the request. It doesn't matter what the response is. Respons is based upon just api url.