socks_proxy icon indicating copy to clipboard operation
socks_proxy copied to clipboard

Request with headers

Open awaik opened this issue 3 years ago • 1 comments

Can't find how to make requests with headers.

For example, with regular HTTP request we can use

Future<Album> fetchAlbum() async {
  final response = await http.get(
    Uri.parse('https://jsonplaceholder.typicode.com/albums/1'),
    // Send authorization headers to the backend.
    headers: {
      HttpHeaders.authorizationHeader: 'Basic your_api_token_here',
    },
  );

How we can do the same with the proxy?

awaik avatar Jan 12 '23 08:01 awaik

I have a same issue.. can't find Request with headers.

hsy159 avatar Jul 03 '23 06:07 hsy159