I'm sending a Post request but getting Get response

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question:
Why my Put request is showing Get response??

Details (like screenshots):
My URL : http://reqres.in/api/users
Jason body: { “name”: “Jenette Caldwell”,“salary”: “2000”,“age”: “15”}

Result body:
“page”: 1,
“per_page”: 6,
“total”: 12,
“total_pages”: 2,
“data”: [
{
…

I’m really new in API testing and literally completed only 1 hour of a tutorial. Please help

image

We will need more info than this.

If its a tutorial, please post a full screenshot of the request and paste the full response JSON, not just a snippet.

Also what are you expecting it to show? (I’m guessing a JSON response stating success or something similar).

When posting code or JSON responses, please use the preformatted text option in the editor so all of the text doesn’t get aligned to the left, which makes it hard to read and spot issues.

Without knowing more about your API, I’m wondering if you have cloned the previous request, but not saved it fully.

Thanks, man. I’ve added a screenshot.

I’ve fixed the problem by typing “https” instead of “http”. Could you please tell me how putting an s solved the problem??

GET requests are usually used for retrieving data. Read only to a certain extent.

A PUT request usually means you are submitting data, so can be classified as a write request.

PUT requests can sometimes be locked behind authentication which isn’t necessarily required for a GET request.

HTTPS is the secure version of HTTP, HTTPS is encrypted in order to increase security of data transfer.

I can possibly understand why the PUT request requires HTTPs but the GET request does not, but in this day and age, both should really be https. (Although it can cause a performance hit).

1 Like