Hi,

I reproduce the behaviour with a simple projet.

My only dependency:

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.0.3</version>
</dependency>


The Main class:

import javax.ws.rs.core.Response;
import org.apache.cxf.jaxrs.client.WebClient;

public class Test
{

    public static void main(String[] args) {
        WebClient.create("http://www.google.fr";).get();
    }

}

If I inspect the emitted request, I see:


GET / HTTP/1.1
*Content-Type: text/xml*
Accept: */*
User-Agent: Apache CXF 3.0.3
Cache-Control: no-cache
Pragma: no-cache
Host: www.google.fr
Connection: keep-alive

Does someone know why CXF is sending the Content-Type header even for a GET
request without any body?

Thanks,

Brubru

Reply via email to