Using HTTP Client to Send a POST Request with Form Data

Hello! Trying to use the http client on server side to send a post request with an application/x-www-form-urlencoded body. How should I create a form data to use in a request?

Right now I have this which is working nice, but curious if there's a better approach without using querystring directly.

pipe(
  HTTP.request.post(`url`),
  HTTP.request.textBody(querystring.stringify({
      a: `a`,
      b: `b`,
      c: `c`
  }), 'application/x-www-form-urlencoded')
)
Was this page helpful?