user2377528
user2377528

Reputation:

AWS api gateway not working same after Deploying API

I have deployed a basic AWS API, Below are the screen shots.

enter image description here

now when i run Test from above and pass parameter shown in Query String of Method Request i will get the following response.

Request: /searchpatents?name=fsf&test=sfsf

Response against above request

{
  "name": "fsf",
  "sample": "sfsf",
  "controller": "awsapi",
  "action": "index",
  "awsapi": {
    "name": "fsf",
    "sample": "sfsf"
  }
}

Which shows that i can use the name and sample parameter on my HTTP endpoint.

Now i have deployed this api by clicking Deploy API button and sends HTTP request via curl and by POSTMAN after exporting it from AWS stage panel, I am not receiving name and test params.

enter image description here

My Integration Request is as below

enter image description here

Upvotes: 1

Views: 1929

Answers (1)

Ka Hou Ieong
Ka Hou Ieong

Reputation: 6535

Making a GET request with a body is non-standard, and API Gateway is ignoring the body in a GET request. Please try to using POST/PUT for a request with a body.

Upvotes: 1

Related Questions