'How to redirect API end point in APIGateway
I have API defined as
/appointment - GET --> Calling Lambda A
/appointment/update - POST --> Calling Lambda B
and third API is
/appointment/${path} -- POST
Now the FrontEnd Angular app calls the first API all okay. When I try to call the Second API from the Front End, it (Angular App) calls the Third API. Now when I look at the body of third API , its basically a RAW POST to second API
"body": "--batch_a0ba0713-711d-45dc-9e5a-8f1dc16a3521\r\nContent-Type: application/http; msgtype=request\r\n\r\nPOST /api/https://xxxx.execute-api.ap-southeast-2.amazonaws.com/prod/appointment/update HTTP/1.1\r\nContent-Type: application/json; charset=utf-8\r\nHost: localhost:4200\r\n\r\n{\"Subject\":\"Zoo\",\"Id\":101,\"StartTime\":\"2017-06-01T01:00:00.000Z\",\"EndTime\":\"2017-06-01T01:30:00.000Z\",\"IsAllDay\":false}\r\n--batch_a0ba0713-711d-45dc-9e5a-8f1dc16a3521--\r\n",
"isBase64Encoded": false
}
so is there a way to configure APIGateway to say that for Third API (/appointment/${path} ) should be redirected to the API POST Call defined in Request Body
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
