mschae / trailing_format_plug

An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json
25 stars 15 forks source link

Change format to _format. Support empty path_info. Closes #8 #9

Closed smpallen99 closed 7 years ago

smpallen99 commented 7 years ago

Support get "/" by matching on %{path_info: []}. Change params["format"] = "json" to params["_format"] to match Phoenix change. Added and updated unit tests.

smpallen99 commented 7 years ago

I updated the version number so it should be ready to publish :)

mschae commented 7 years ago

Released 0.0.5. Thanks @smpallen99!