userAgent property

  1. @override
String? get userAgent
override

Gets and sets the default value of the User-Agent header for all requests generated by this HttpClient.

The default value is Dart/<version> (dart:io).

If the userAgent is set to null, no default User-Agent header will be added to each request.

Implementation

@override
String? get userAgent => _httpClient.userAgent;
  1. @override
set userAgent (String? value)
override

Gets and sets the default value of the User-Agent header for all requests generated by this HttpClient.

The default value is Dart/<version> (dart:io).

If the userAgent is set to null, no default User-Agent header will be added to each request.

Implementation

@override
set userAgent(String? value) => _httpClient.userAgent = value;