public interface Network extends ProfileService, Observable<NetworkEvent>, Advisable<NetworkCallback>
Modifier and Type | Method and Description |
---|---|
java.lang.String |
acceptLanguage()
Returns a string that represents the Accept-Language request-header field.
|
void |
acceptLanguage(java.lang.String language)
Configures the accept language.
|
HttpAuthPreferences |
httpAuthPreferences()
Returns an HTTP authorization preferences.
|
java.lang.String |
userAgent()
Returns a string that represents the default user-agent.
|
profile
on
HttpAuthPreferences httpAuthPreferences()
java.lang.String acceptLanguage()
da, en-gb;q=0.8, en;q=0.7
. The default Accept-Language is en-us
.
java.lang.IllegalStateException
- when the profile is deleted or its engine is closedvoid acceptLanguage(java.lang.String language)
en-us
.
For example, fr, en-gb;q=0.8, en;q=0.7
would mean: "I prefer French, but will
accept British English and other types of English". Note, that all languages which are
assigned a quality factor greater than 0 are acceptable.
language
- a new string that represents the "Accept-Language" HTTP header valuejava.lang.IllegalArgumentException
- when language
is empty or blankjava.lang.IllegalStateException
- when the profile is deleted or its engine is closedjava.lang.String userAgent()
The default user-agent string can be configured through the EngineOptions.Builder.userAgent(String)
method. If the default
user-agent string has not been specified, then this method returns a string obtained from the
Chromium engine.
java.lang.IllegalStateException
- when the profile is deleted or its engine is closed