DVBrowserHttpTransport class
The browser's own stack, reached through package:http on web.
The browser negotiates HTTP/2 and HTTP/3 without being asked and acts on 103 Early Hints itself, starting the preloads before the page is told anything. Neither the negotiated protocol nor the hints are visible to script, so this reports the capability and leaves DVHttpResponse.protocol null: claiming a protocol it cannot observe would be a guess dressed as a measurement.
A request to an origin named in DVCredentialedOrigins is sent with
credentials: 'include', so the session cookie reaches an API on another
origin; every other request keeps the browser's same-origin default.
- Implemented types
Constructors
- DVBrowserHttpTransport({Client clientFor({required bool withCredentials}) = browser.dvBrowserHttpClient})
-
const
Properties
- clientFor → Client Function({required bool withCredentials})
-
Makes the client for one request. A test records what it was asked.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
A name for diagnostics:
package:http,rust,fetch.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedProtocols
→ Set<
DVHttpProtocol> -
Protocols this transport can actually speak here — which depends on the
platform, not only on the implementation.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
DVHttpRequest request) → Future< DVHttpResponse> -
Sends
request, which is already pinned to a single protocol.override -
stream(
DVHttpRequest request) → Future< DVHttpStreamedResponse> -
Sends
requestand yields the body as it arrives.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited