eclipsesource / eclipsesource/restfuse

For a 401 http status no body returned

Open
#36 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
95
Forks
28
PR merge metrics
No merged PRs in 30d

Description

On a unauthorized response the request response.getBody(String.class) does return a null string.
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm="OAuth2 Secure"
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Server: Jetty(8.y.z-SNAPSHOT)

{"error":"invalid_client","error_description":"Client authentication failed (e.g. unknown client, no client authentication included, or unsupported authentication method)"}

the request I send is
POST /token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Accept-Language: en-US
Accept-Charset: utf-8
Accept: application/json
Cache-Control: no-cache
User-Agent: Java/1.6.0_41
Host: localhost:8000
Content-Length: 50

grant_type=client_credentials&client_secret=what

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.