apache / apache/openwhisk-apigateway

API GW should adhere to "Accept" header dictates as much as possible

Open
#276 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.