URISchemeResponse
Superclasses: Object
- Constructors:
URISchemeResponse(**properties)
new(input_stream:Gio.InputStream, stream_length:int) -> WebKit.URISchemeResponse
Constructors
- class URISchemeResponse
- classmethod new(input_stream: InputStream, stream_length: int) URISchemeResponse
Create a new
URISchemeResponse
Added in version 2.36.
- Parameters:
input_stream – a
InputStream
to read the contents of the requeststream_length – the length of the stream or -1 if not known
Methods
- class URISchemeResponse
- set_content_type(content_type: str) None
Sets the content type for the
response
Added in version 2.36.
- Parameters:
content_type – the content type of the stream
- set_http_headers(headers: MessageHeaders) None
Assign the provided
MessageHeaders
to the response.headers
need to be of the type%SOUP_MESSAGE_HEADERS_RESPONSE
. Any existing headers will be overwritten.Added in version 2.36.
- Parameters:
headers – the HTTP headers to be set
- set_status(status_code: int, reason_phrase: str | None = None) None
Sets the status code and reason phrase for the
response
.If
status_code
is a known value andreason_phrase
isNone
, thereason_phrase
will be set automatically.Added in version 2.36.
- Parameters:
status_code – the HTTP status code to be returned
reason_phrase – a reason phrase
Properties
- class URISchemeResponse
- props.stream: InputStream
The input stream to read from.
Added in version 2.36.