4

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.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Punit Goswami
  • 73
  • 1
  • 6

1 Answers1

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