[
https://issues.apache.org/jira/browse/CXF-6553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-6553.
-----------------------------------
Resolution: Fixed
Assignee: Sergey Beryozkin
Fix Version/s: 3.0.7
3.1.3
> Unable to override Content-Type on GET requests
> -----------------------------------------------
>
> Key: CXF-6553
> URL: https://issues.apache.org/jira/browse/CXF-6553
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.1.2
> Reporter: Michael Kunze
> Assignee: Sergey Beryozkin
> Fix For: 3.1.3, 3.0.7
>
>
> Please consider the following code:
> ClientBuilder.newClient()
> .target("http://localhost")
> .request(MediaType.APPLICATION_JSON)
> .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
> .get();
> which results in:
> GET / HTTP/1.1
> Content-Type: */*
> Accept: application/json
> User-Agent: Apache CXF 3.1.2
> Cache-Control: no-cache
> Pragma: no-cache
> Host: localhost
> Connection: keep-alive
> Expected would be:
> ...
> Content-Type: application/json
> ...
> I'm using the following dependency:
> compile 'org.apache.cxf:cxf-rt-rs-client:3.1.2'
> Is there any way to set the Content-Type on GET requests?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)