Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
253: Remove Content-Type from non-body HTTP methods r=curquiza a=thicolares - The non-body HTTP methods: GET and DELETE. - Expose the headers as arg to make it explicit and move the decision/concern to each method instead of send_request. - Use keywords args as there're multiple optional ones. - Extract the non-body headers to a classes property to convey its intention with its name and reduce duplication. - Duly update related test. Closes the topic 1/3 of #243. It's a small step towards the other topics. Maybe they could even be bundled into a single PR, but I don't think it's mandatory. > Currently, the SDKs always send Content-Type: application/json to every request. Only the POST and PUT requests should send the Content-Type: application/json and not the DELETE and GET ones. Co-authored-by: Thiago Colares <thicolares@gmail.com>
- Loading branch information
Showing
2 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters