Skip to content

Conversation

@laodaniel
Copy link
Contributor

@laodaniel laodaniel commented Apr 23, 2025

related to https://github.com/weekendesk/tech-management/issues/1507

Scope

Before version 2.0.0 we were using the deprecated library request.
This library includes an option json set by default which parses the response body as JSON.

We have some API endpoints with incorrect content-type which returns JSON as text in the body.
As a workaround we want to force the json parsing if the request header contains application/json.
This behaviour is the same than version <2.0.0.

@laodaniel laodaniel force-pushed the force-json-parsing branch from dcda582 to cd6f718 Compare April 24, 2025 07:14
@laodaniel laodaniel marked this pull request as ready for review April 24, 2025 07:14
@laodaniel
Copy link
Contributor Author

I won't merge this workaround.
We found a better alternative to avoid bad response content-type from our API.
By setting a header accept: application/json;charset=utf-8 we will have the correct response content-type. We don't need this feature, i'm closing the PR.

@laodaniel laodaniel closed this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants