Skip to content

Retrofit 2 Close ErrorResponse Body #2929

Open
@paourissi

Description

@paourissi

I am using retrofit 2 and I was wondering if i have to call the close function when receiving an error body or retrofit closes it automatically?.

public void onResponse(Call call, Response response) {
if (response.isSuccessful()) {
// Success
} else {
response.errorBody().close(); ???????????????????
}
}

Thank you

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