Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAJOR REFACTORING. This could cause breakages (it's not supposed to, …
…but it's a big change and could have bugs). Refactor the core interface to accept http.Requests as input. The old interface simulated an http client, by providing methods like Get(), Post(), Delete(), etc. However, it didn't fully replicate the richness of a real HTTP client, so we had to add lots of hacks. For example, there was a special PostXml method which set the Content-Type header to application/xml. After this refectoring, the we expose a full HTTP client (via MakeHttpClient). This gives users the power to exactly specify what they need. The makeAuthorizedRequest function can generate http.Requests which correspond to the old Get(), Post(), PostXml(), etc. methods so they will continute to work for backwards compatibility. However, all users are encouraged to migrate to the MakeHttpClient API.
- Loading branch information
Showing
2 changed files
with
556 additions
and
68 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
Oops, something went wrong.