All Versions
8
Latest Version
Avg Release Cycle
466 days
Latest Release
508 days ago

Changelog History

  • v1.3.0

    July 08, 2019
    • โž• Add Sling ResponseDecoder setter for receiving responses with a custom ResponseDecoder (#49)
    • โž• Add Go module support (i.e. go.mod). Exclude examples (multi-module). (#52)
  • v1.2.0

    November 18, 2018
    • โž• Add Connect, Options, and Trace HTTP methods (c51967)
    • Skip receiving (i.e. decoding) 204 No Content responses (#31)
  • v1.1.0

    December 18, 2016
    • ๐Ÿ‘ Allow JSON decoding, regardless of response Content-Type (#26)
    • โž• Add BodyProvider interface and setter so request Body encoding can be customized (#23)
    • โž• Add Doer interface and setter so request sending behavior can be customized (#21)
    • โž• Add SetBasicAuth setter for Authorization headers (#16)
    • โž• Add Sling Body setter to set an io.Reader on the Request (#9)
  • v1.0.0

    • โž• 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

    • ๐Ÿ‘Œ Improved golint compliance
    • ๐Ÿ›  Fixed typos and test printouts
  • v0.3.0

    • โž• 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

    • โž• 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

    • ๐Ÿ‘Œ Support decoding JSON responses.