Currently the edge rtac API always returns XML. Honoring the accept header for at least application/json will make it easier for external systems to consume this service.
Really, this means that if the accept header is request application/json, we just return the json response obtained from mod-rtac, instead of converting it to XML.
Any other value specified in the accept header would result in XML, including if the accept header is omitted altogether.
- If accept header equals '*/*' or 'application/xml' or isn't specified, then response returns xml
- If accept header equals 'application/json', then response returns json
- Inappropriate accept headers (such as image/* or even application/*) should result in HTTP 406 Unacceptable status
- The service an return either xml or json based upon the request's accept header
- HTTP 406 error is returned in case of inappropriate accept headers specified in request
- Unit tests are updated
- API tests are updated.