Skip to content

Migrate Client to HttpClient to offer the proxy setup #392

@onewilk

Description

@onewilk

In some case, developers need to config httpClient proxy settings to request the public network cause company's network security requirement.

So here is the problem:

sentry_options.dart

set httpClient(Client httpClient) => _httpClient = httpClient ?? _httpClient;

Client is an abstract class from the http lib, and it doesn't offer the proxy setup yet.

Please migrate Client to HttpClient from dart:io.

then developers could set proxy just like this

httpClient.findProxy = (url) => "PROXY xxxx:xxxx";

or just use project's global singleton HttpClient object directly.

Sorry for my poor english ~

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions