Discussion:
[influxdb] [InfluxDB] Go http.Post
a***@hushmail.com
2018-05-29 09:34:25 UTC
Permalink
HI,

I can quite easily post to InfluxDB through curl:


*curl -i -XPOST 'http://localhost:8086/write?db=mongodb' \--data-binary
'locust,name=urlBash
cumulative_requests=314457,failures=0,median=1,minimum=0,maximum=328,requests_per_second=3.30'*

I am having a terrible time using Go though and I wondered if anyone had an
example?
* req, err := http.Post("http://localhost:8086/write?db=mongodb",
"locust,name=urlBash
cumulative_requests=775057,failures=0,median=1,minimum=1,maximum=328,requests_per_second=1.49",
nil)*

Thanks

Aidy
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/0a673016-fd03-4124-b1fc-dc644482f239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...