Rohde-Schwarz / sparrow

Define your request and response JSON format with a Rack middleware!
MIT License
13 stars 6 forks source link

Decide the response-strategy based on the response content-type #3

Closed kampfschlaefer closed 9 years ago

kampfschlaefer commented 9 years ago

Previously both the request strategy and the response strategy were decided upon the content-type of the request only. This is obviously wrong for requests where json goes in and non-json goes out.

So now the strategy is decided on the content-type of request and response individually. For this the determination of the content_type had to be moved into the response_middleware and request_middleware.

Pair programmed by @enricogenauck and me.