apache / apache/openwhisk-apigateway
API GW should adhere to "Accept" header dictates as much as possible
Open
- Dominant language
- Lua
- Stars
- 65
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Here is one specific example, although other scenarios likely have the same issue.
1. Create an API that is configured with "Require applications to authenticate via API key" enabled.
2. Invoke the API using curl, but specifying the "Accept" media type as something besides application/json
3. A 401 is returns with a JSON body and "Content-Type" value of `application/json`
```
>curl https://service.us.apiconnect.ibmcloud.com/gws/apigateway/api/API-UNIQUE-ID/API-PATH -H "Accept: application/xml"
{"status":401,"message":"Error: Unauthorized"}
```
Contributor guide
Assessment
This issue has not been assessed yet.