forked from dghubble/sling
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dghubble#7 from dghubble/dev
Proposed v1.0
- Loading branch information
Showing
7 changed files
with
795 additions
and
306 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Sling Changelog | ||
|
||
Notable changes between releases. | ||
|
||
## v1.0.0 (2015-05-23) | ||
|
||
* Added support for receiving and decoding error JSON structs | ||
* Renamed Sling `JsonBody` setter to `BodyJSON` (breaking) | ||
* Renamed Sling `BodyStruct` setter to `BodyForm` (breaking) | ||
* Renamed Sling fields `httpClient`, `method`, `rawURL`, and `header` to be internal (breaking) | ||
* Changed `Do` and `Receive` to skip response JSON decoding if "application/json" Content-Type is missing | ||
* Changed `Sling.Receive(v interface{})` to `Sling.Receive(successV, failureV interface{})` (breaking) | ||
* Previously `Receive` attempted to decode the response Body in all cases | ||
* Updated `Receive` will decode the response Body into successV for 2XX responses or decode the Body into failureV for other status codes. Pass a nil `successV` or `failureV` to skip JSON decoding into that value. | ||
* To upgrade, pass nil for the `failureV` argument or consider defining a JSON tagged struct appropriate for the API endpoint. (e.g. `s.Receive(&issue, nil)`, `s.Receive(&issue, &githubError)`) | ||
* To retain the old behavior, duplicate the first argument (e.g. s.Receive(&tweet, &tweet)) | ||
* Changed `Sling.Do(http.Request, v interface{})` to `Sling.Do(http.Request, successV, failureV interface{})` (breaking) | ||
* See the changelog entry about `Receive`, the upgrade path is the same. | ||
* Removed HEAD, GET, POST, PUT, PATCH, DELETE constants, no reason to export them (breaking) | ||
|
||
## v0.4.0 (2015-04-26) | ||
|
||
* Improved golint compliance | ||
* Fixed typos and test printouts | ||
|
||
## v0.3.0 (2015-04-21) | ||
|
||
* Added BodyStruct method for setting a url encoded form body on the Request | ||
* Added Add and Set methods for adding or setting Request Headers | ||
* Added JsonBody method for setting JSON Request Body | ||
* Improved examples and documentation | ||
|
||
## v0.2.0 (2015-04-05) | ||
|
||
* Added http.Client setter | ||
* Added Sling.New() method to return a copy of a Sling | ||
* Added Base setter and Path extension support | ||
* Added method setters (Get, Post, Put, Patch, Delete, Head) | ||
* Added support for encoding URL Query parameters | ||
* Added example tiny Github API | ||
* Changed v0.1.0 method signatures and names (breaking) | ||
* Removed Go 1.0 support | ||
|
||
## v0.1.0 (2015-04-01) | ||
|
||
* Support decoding JSON responses. | ||
|
||
|
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.