changeUserAgent static method

void changeUserAgent([
  1. String userAgent = OgHrefClient.DEFAULT_USER_AGENT_STRING
])

Define a value of user agent when making request in fetchFromHttp.

If disguiseUserAgent enabled, any changes will not be applied until it disabled and uses user defined again.

Implementation

static void changeUserAgent(
    [String userAgent = OgHrefClient.DEFAULT_USER_AGENT_STRING]) {
  OgHrefClient.userAgent = userAgent;
}