Skip to content
Advertisement

HTTP post request?param=PARAM vs –data-urlencode

i am just querying my InfluxDB and i made it work, but i never did web so i am not so experienced with http protocol. I need to do curl request.

This one works fine:

JavaScript

But this does not and i dont understand why, i thought it is the same thing just differently put.

JavaScript

I guess no need for u to understand Influx to help me, I post this question after an hour of research and I just dont have time for this right now, can someone please just explain the concept to me? I can make it work obviously but this frustrates me since i thought its the same thing.

Thanks four the time, Q.

Advertisement

Answer

The mistake – is that you sends two payloads. The first example contains orgId as url parameter. In second orgId sent like payload and also sent data with influx query.

JavaScript

And when you send such a request, it just takes the last payload

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement