I am successfully able to make GET requests to a service hosted behind IAP, but am running into issues when making POST requests the same way. Also, I was not able to find any documentation for the same. All examples seem to be for GET requests.
Asked
Active
Viewed 1,156 times
1 Answers
11
Equally frustrated with the terrible documentation on that library. Here is how to make a POST:
const { status, data } = await client.request({
url: 'https://example.com/some/path',
method: 'POST',
data: {
hello: 'world'
}
})

Nicolas Dao
- 987
- 12
- 22
-
1thanks @nicolas - had to resort to reading the source code, this saved me a lot time for something so simple. – PNC Nov 21 '21 at 19:17
-
1Agreed! Extremely frustrated that this is not very well documented! – Eric Crescioni Jan 05 '22 at 22:36