public interface Network extends EngineService, 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 acceptLanguage)
Configures the accept language.
|
HttpAuthPreferences |
httpAuthPreferences()
Returns an HTTP authorization preferences.
|
UrlRequestJob |
newUrlRequestJob(UrlRequestJob.Options options)
Creates and returns a new
UrlRequestJob instance with the given options. |
java.lang.String |
userAgent()
Returns a string that represents the default user-agent.
|
onHttpAuthPreferences 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 engine is closed and its proxy service isn't available
anymorevoid acceptLanguage(java.lang.String acceptLanguage)
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.
acceptLanguage - a new string that represents the "Accept-Language" HTTP header valuejava.lang.IllegalArgumentException - when acceptLanguage is empty or blankjava.lang.IllegalStateException - when the engine is closed and its proxy service isn't available
anymorejava.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.
UrlRequestJob newUrlRequestJob(UrlRequestJob.Options options)
UrlRequestJob instance with the given options.