Skip to content

[Retrofit2 + Play! WS client ] Add headers  #6980

@tzimisce012

Description

@tzimisce012
Description

I am not able to set custom headers from the ApiClient class.

Swagger-codegen version

2.3.0-SNAPSHOT

Suggest a fix/enhancement

Wouldn't be a good idea to have something like this?

Map<String, List<String>> headers = new HashMap<>();
//fill the map with your headers
ApiClient generatedClient = new ApiClient(client)
                .setBasePath(basePath)
                .setHeaders(headers);

BalanceApi api = generatedClient.createService(BalanceApi.class);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions