Skip to content

Allow specifying a custom OkHttp client #620

Closed
@Jawnnypoo

Description

@Jawnnypoo

Since 1.14+ have a hard dependency on OkHttp, I think it would be great to expose the ability to specify the OkHttpClient to use. We would probably have to have them pass an OkHttpClient.Builder, so that we can add things to it as needed, and override things if necessary, but this would be great because we would then be exposing many things that were not previously exposed, such as HTTP timeouts, the ability to specify things like certificate pinning, and would eliminate the need for the class ParseNetworkInterceptor.

What do you think @rogerhu ? I am happy to make a PR with this, keeping in mind backwards compatibility.

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