# Subscription HTTP request seems empty

**URL:** <https://community.influxdata.com/t/subscription-http-request-seems-empty/14661>\
**Category:** Systems\
**Created:** [June 3, 2020, 7:29pm UTC](https://community.influxdata.com/t/subscription-http-request-seems-empty/14661 "2020-06-03T19:29:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptoews](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ptoews/32/5073_2.png) [@ptoews](https://community.influxdata.com/u/ptoews)\
**Post date:** [June 3, 2020, 7:29pm UTC](https://community.influxdata.com/t/subscription-http-request-seems-empty/14661/1 "2020-06-03T19:29:47Z")

</div>

I’m trying to receive inserted data points in a custom script. However, I just cannot find out how to get the actual data point from the HTTP request.  
I’ve configured a subscription in my influx db and enabled subscriptions in the config. The subscription works if I start another influxdb in docker on the specified port, the data point is replicated. But in a simple python script using flask, the form parameters are shown as empty. Additionally, when I send an influx line via curl to the flask server, it is properly received.

Here is the output of “show subscriptions”:

> ```
> show subscriptions
> name: datalogger
> retention_policy name mode destinations
> ---------------- ---- ---- ------------
> autogen replication ALL [http://localhost:8087]
> 
> ```

Output from influxdb.service:

> ```
> Jun 03 21:23:15 philipp-desktop influxd[2683]: [httpd] 127.0.0.1 - - [03/Jun/2020:21:23:15 +0200] "POST /write?consistency=all&db=datalogger&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBShell/1.7.10" ac25a3c0-a
> Jun 03 21:23:16 philipp-desktop influxd[2683]: [httpd] 127.0.0.1 - - [03/Jun/2020:21:23:16 +0200] "POST /write?consistency=all&db=datalogger&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBShell/1.7.10" ac9c03dc-a
> Jun 03 21:23:16 philipp-desktop influxd[2683]: [httpd] 127.0.0.1 - - [03/Jun/2020:21:23:16 +0200] "POST /write?consistency=all&db=datalogger&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBShell/1.7.10" acfeed2e-a
> 
> ```

The flask script:

> ```
> from flask import Flask, request
> app = Flask( __name__ )
> @app.route('/write', methods=['POST'])
> def result():
> print("Request form:", request.form)
> return ""
> 
> ```

Its output:

> ```
> 127.0.0.1 - - [03/Jun/2020 21:23:15] "POST /write?consistency=&db=datalogger&precision=ns&rp=autogen HTTP/1.1" 200 -
> Request form: ImmutableMultiDict([])
> 127.0.0.1 - - [03/Jun/2020 21:23:16] "POST /write?consistency=&db=datalogger&precision=ns&rp=autogen HTTP/1.1" 200 -
> Request form: ImmutableMultiDict([])
> 127.0.0.1 - - [03/Jun/2020 21:23:16] "POST /write?consistency=&db=datalogger&precision=ns&rp=autogen HTTP/1.1" 200 -
> Request form: ImmutableMultiDict([])
> 
> ```

Curl command:

> `curl -i -XPOST "http://localhost:5000/write?db=mydb&precision=s" --data-binary 'mymeas,mytag=1 myfield=90 1463683075'`

Output of the flask script after the curl command:

> ```
> Request form: ImmutableMultiDict([('mymeas,mytag', '1 myfield=90 1463683075')])
> 127.0.0.1 - - [03/Jun/2020 21:27:25] "POST /write?db=mydb&precision=s HTTP/1.1" 200 -
> 
> ```

This thread seems similar, but hasn’t gotten any answers: [How Can I receive complete subscribed data via http server](https://community.influxdata.com/t/how-can-i-receive-complete-subscribed-data-via-http-server/9041)

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [June 5, 2020, 5:55pm UTC](https://community.influxdata.com/t/subscription-http-request-seems-empty/14661/2 "2020-06-05T17:55:48Z")

</div>

Hello @ptoews,  
Welcome! Please excuse my confusion, are you. just looking to execute a GET request on the query endpoint?

> **[InfluxDB API reference | InfluxDB OSS 1.8 Documentation](https://docs.influxdata.com/influxdb/v1.8/tools/api/#examples-1)**
>
> Use the InfluxDB API endpoints to run queries, write data, check server status, and troubleshoot by tracking HTTP client requests, collecting server statistics, and using Go “pprof” profiles.

---

<div class="post-metadata">

**Author:** ![ptoews](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ptoews/32/5073_2.png) [@ptoews](https://community.influxdata.com/u/ptoews)\
**Post date:** [June 5, 2020, 6:11pm UTC](https://community.influxdata.com/t/subscription-http-request-seems-empty/14661/3 "2020-06-05T18:11:13Z")

</div>

Hi @Anaisdg, not exactly. I am trying to receive a POST request by an influx subscription to the write endpoint in a custom script.
