Class SetExtraHeadersCommandParameters
- Namespace
- WebDriverBiDi.Network
- Assembly
- WebDriverBiDi.dll
Provides parameters for the network.setExtraHeaders command.
public class SetExtraHeadersCommandParameters : CommandParameters<SetExtraHeadersCommandResult>
- Inheritance
-
SetExtraHeadersCommandParameters
- Inherited Members
Constructors
SetExtraHeadersCommandParameters()
public SetExtraHeadersCommandParameters()
Properties
Contexts
Gets the browsing contexts, if any, for which to set the extra headers.
[JsonIgnore]
public List<string> Contexts { get; }
Property Value
Remarks
The protocol requires this property, when present, to contain at least one entry. An empty list therefore means "not specified": the property is omitted from the JSON payload entirely, and an empty array is never sent. Add entries to the list to scope the command.
The two scopes are mutually exclusive: a command that names both browsing contexts and user contexts is
rejected by the remote end with an invalid argument error. Scope the command one way or the other.
Headers
Gets the list of extra HTTP headers to send with every request.
[JsonPropertyName("headers")]
public List<Header> Headers { get; }
Property Value
MethodName
Gets the method name of the command.
[JsonIgnore]
public override string MethodName { get; }
Property Value
ResetExtraHeaders
Gets a pre-initialized instance of SetExtraHeadersCommandParameters with the Headers property set to an empty list to clear the extra headers at whichever scope the instance targets: the session-wide headers when neither Contexts nor UserContexts is populated, or the headers of the named contexts or user contexts otherwise; the remote end keeps each scope separately. Returns a new instance on each access to allow for modification of the properties without affecting other uses. Functionally equivalent to using the parameterless constructor, but provided as a named property to make the intent of clearing the extra headers more explicit in code that uses this property.
public static SetExtraHeadersCommandParameters ResetExtraHeaders { get; }
Property Value
UserContexts
Gets the user contexts, if any, for which to set the extra headers.
[JsonIgnore]
public List<string> UserContexts { get; }
Property Value
Remarks
The protocol requires this property, when present, to contain at least one entry. An empty list therefore means "not specified": the property is omitted from the JSON payload entirely, and an empty array is never sent. Add entries to the list to scope the command.
The two scopes are mutually exclusive: a command that names both browsing contexts and user contexts is
rejected by the remote end with an invalid argument error. Scope the command one way or the other.