Closed Tobiaswk closed 2 years ago
I've discovered the issue. The API now requires the User-Agent
header to be present in requests.
Hi @Tobiaswk. Thanks for the info. I'm not seeing any issue here. It's still working without User-Agent.
Could it be the client you're using that automatically adds the User-Agent HTTP header?
Den 26. december 2021 17.16.45 CET, Phil Cole @.***> skrev:
Hi @Tobiaswk. Thanks for the info. I'm not seeing any issue here. It's still working without User-Agent.
-- Reply to this email directly or view it on GitHub: https://github.com/filcole/pycarwings2/issues/37#issuecomment-1001207125 You are receiving this because you were mentioned.
Message ID: @.***>
pycarwings2 is sending the following headers to https://gdcportalgw.its-mo.com/api_v210707_NE/gdc/
:
'User-Agent': ''
'Content-Length': '79' <- variable
'Content-Type': 'application/x-www-form-urlencoded'
That explains it then. If the User-Agent
header is missing the API will fail with the body {status: 404, message: INVALID PARAMS}
. If the User-Agent
header is present but is containing an empty string it works without issues. Peculiar behavior but it makes sense now.
Thanks @Tobiaswk, thanks for the work on dartcarwings too.
I am the maintainer of dartcarwings and today December 22. something has changed in the API.
Calls to the
UserLoginRequest.php
always returns{status: 404, message: INVALID PARAMS}
. I have decompiled the latest release 3.6.1 and I haven't been able to find the cause yet. The base URL is stillhttps://gdcportalgw.its-mo.com/api_v210707_NE/gdc/
.Posting here to make people aware of the issue and possibly work together on a solution.