Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A collection of general API improvements #36

Merged
merged 2 commits into from
Jan 17, 2017

Commits on Jan 16, 2017

  1. A collection of general API improvements

    - Working with Conn APIs requires calling new/0 or new/1 first
      old APIs are deprecated
    - new/1 parses the provided string with URI.parse/1 and sets the Conn
      struct fields accordingly (so you can pass full or partial url
      fragments and get what you would expect, including those containing
      query strings)
    - All headers are normalized to lower-case on put/get, and internally
      headers are a simple key/value map instead of the previous key =>
      key/value map, which was unnecessary.
    - Implemented get_req_headers/1, deprecated get_req_header/1
    - Implemented put_req_headers/2, deprecated put_req_header/2
    - get_req_header/2 returns String.t instead of {String.t, String.t}
    - get_req_headers/1 returns %{String.t => String.t} instead of
      %{String.t => %{String.t => String.t}}
    - Added a number of typespecs, and fixed invalid ones
    - Some small style fixes, documentation updates
    - Fixed a bug with the Header middleware which was not overriding
      headers in the connection if already set. This one may be up for
      discussion if what's really desired.
    - Added HeaderCase middleware for enforcing header casing
    bitwalker committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    614244b View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2017

  1. Merged branch 'fix-baseurl-middleware' into api-improvements

    - Added more tests
    bitwalker committed Jan 17, 2017
    Configuration menu
    Copy the full SHA
    51dcd96 View commit details
    Browse the repository at this point in the history