Skip to content

Retrofit module. Content-Type header is not passed #1531

@zeldigas

Description

@zeldigas

Configuration:

        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>retrofit</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.asynchttpclient</groupId>
            <artifactId>async-http-client</artifactId>
            <version>2.4.3</version>
        </dependency>
        <dependency>
            <groupId>org.asynchttpclient</groupId>
            <artifactId>async-http-client-extras-retrofit2</artifactId>
            <version>2.4.3</version>
        </dependency>

I found that content type header is not passed properly to AHC's request. The problem is that content-type is contained in Body object (retrofit object), not in headers list, but this field is ignored in createRequest method of org.asynchttpclient.extras.retrofit.AsyncHttpClientCall

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions