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.
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'
}
})