Hi there,
Using the api client, I have an issue when retrieving token ( in the frame of the installation of the newest test tower in Ardeche)
With correct creds (tested at https://api.pyronear.org/docs ), it basically works with some creds, and not with others !
At first, I thought it might be due to the encoding of the characters, as "application/x-www-form-urlencoded" as Content type is not recommended to send text with non ASCII characters, in the request headers.
Hence, switching from request with application/x-www-form-urlencoded to a "classic" post request with a json data, solves the issue.
However I realise that this solution is fortuitous because creds tested do not contain non-ASCII characters 🤣
So, to be pragmatic, why using content type application/x-www-form-urlencoded in the first place to retrieve token ?
Is there any specific reason ? Otherwise, this PR #215 could be useful to avoid the problem mentioned above
happy to discuss it !
If anyone has an explanation as to why this doesn't work, I'm interested (text encoding then decoding causing issues?)
Hi there,
Using the api client, I have an issue when retrieving token ( in the frame of the installation of the newest test tower in Ardeche)
With correct creds (tested at https://api.pyronear.org/docs ), it basically works with some creds, and not with others !
At first, I thought it might be due to the encoding of the characters, as "application/x-www-form-urlencoded" as Content type is not recommended to send text with non ASCII characters, in the request headers.
Hence, switching from request with application/x-www-form-urlencoded to a "classic" post request with a json data, solves the issue.
However I realise that this solution is fortuitous because creds tested do not contain non-ASCII characters 🤣
So, to be pragmatic, why using content type application/x-www-form-urlencoded in the first place to retrieve token ?
Is there any specific reason ? Otherwise, this PR #215 could be useful to avoid the problem mentioned above
happy to discuss it !
If anyone has an explanation as to why this doesn't work, I'm interested (text encoding then decoding causing issues?)