HTTP2::stream¶
Description¶
Gets or sets the stream attributes including id and priority. The
subcommands include commands to get the current stream id. The
subcommands also include commands to get or set the current stream
priority.
Syntax¶
HTTP2::stream
HTTP2::stream id
HTTP2::stream priority
HTTP2::stream <priority>
HTTP2::stream priority <priority>¶
- Sets the priority of the current active stream. The return is 0 is the priority was set. Return is an error if the priority is out of bounds (exceeding 8 bits).
Examples¶
when HTTP_REQUEST {
if {[HTTP2::version] != 0} {
set new_pri [URI::query [HTTP::uri] pri]
if { $new_pri != "" } {
HTTP2::priority $new_pri
}
HTTP::header insert "X-HTTP2-Values stream/priority " "[HTTP2::stream]/[HTTP2::priority]"
}
}