eclipse-ee4j / eclipse-ee4j/jersey

Suppress Warn Log when using a GET method request with a message-body.

Open
#3,405 4 comments 0 reactions 0 assignees View on GitHub
Component: core Priority: Major Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

I'm troubled by WARN log outputted by JerseyClient when using a GET
method request with a message-body.
The WARN log is outputted by following codes below.
[https://github.com/jersey/jersey/blob/master/core-client/src/main/java/org/glassfish/jersey/client/JerseyInvocation.java#L147](https://github.com/jersey/jersey/blob/master/core-client/src/main/java/org/glassfish/jersey/client/JerseyInvocation.java#L147)

HTTP GET methods with a message-body are used by APIs such as
Elasticsearch search API.
[https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html)

The HTTP spec doesn't prevent us from sending a message-body with GET
explicitly.
[http://stackoverflow.com/questions/5216567/is-this-statement-correct-http-get-method-always-has-no-message-body](http://stackoverflow.com/questions/5216567/is-this-statement-correct-http-get-method-always-has-no-message-body)

Though these kind of requests are not recommended, I think that
outputting WARN log by every requests is inconvenient because a large
amount of WARN are outputted.

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.