Adding custom parameters
Hello, can anybody help me, how to add custom params to my POST request ?
I need add some id of user, and send it using GET request is not good idea.
In docs I found only httpHeaders parameters, that allow to send headers, but how to send some extra params I didn't found.
I have same requirement to pass location with user id as params. @kholiavko-roman do you find some thing.
@kholiavko-roman @anil-kumar-singh One way of solving this would be to use an authentication token (e.g. JWT) and pass that in the httpHeaders.
@anil-kumar-singh, I sloved my problem by adding option which add custom parameters to request, if you nedd it, I cat make PR. (I made it only for android)
@tomatopeel, thanks, but I need send not only auth key, but some additional params.
Why don't you add requested params into url? https://server:port/?param1=value1¶m2=value2. Simple as that.
EDIT:
I need add some id of user, and send it using GET request is not good idea.
It's not good idea, only when using plain http, because urls are often logged in intermediate proxies. Even if we ignore proxy logging fact, sending sensitive information via unencrypted channel is terrible idea. But if you use https, sending user id in url is perfectly fine, as only domain name is sent unencrypted.
Some may argue, that sensitive information might appear in your own server logs. That's true, however I suppose you can secure your own server to prevent information leakage from the logs.
As I sad in my case I think this is not safe. Anyway, thanks for advice!
Intentionally I didn't add any POST params, as I don't see any use case, that could not be done with url params or httpHeaders. Why is your use case so special? Really curious.
My case in not special, just I prefer think that send auth key in get params it is not safe. Maybe I wrong.