http.endpoint() function

The http.endpoint() function sends output data to an HTTP URL using the POST request method.

import "http"

    url: "http://localhost:1234/"



The URL to POST to.


A function that builds the record used to generate the POST request.

You should rarely need to override the default mapFn parameter. To see the default mapFn value or for insight into possible overrides, view the http.endpoint() source code.

mapFn accepts a table row (r) and returns a record that must include the following fields:

  • headers
  • data

For more information, see

Was this page helpful?

Thank you for your feedback!

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.