Status: Closed (View Workflow)
Resolution: Won't Do
Affects Version/s: None
Fix Version/s: None
Sprint:Prokopovych - Sprint 134
Currently the edge patron API always returns JSON. Honoring the accept header for at least application/xml will make it easier for external systems to consume this service.
Really, this means that if the accept header is request application/xml, we convert the json into XML response.
Any other value specified in the accept header would result in JSON, including if the accept header is omitted altogether.
- If accept header equals '*/*' or 'application/json' or isn't specified, then response returns json
- If accept header equals 'application/xml', then response returns xml
- Inappropriate accept headers (such as image/* or even application/*) should result in HTTP 415 Unsupported Media Type status
- The service an return either xml or json based upon the request's accept header
- HTTP 415 error is returned in case of inappropriate accept headers specified in request
- Unit tests are updated
- API tests are updated.