Struct ws::Response [] [src]

pub struct Response { /* fields omitted */ }

The handshake response.

Methods

impl Response
[src]

[src]

Edit the value of the first instance of an HTTP header.

[src]

Access the request headers.

[src]

Edit the request headers.

[src]

Get the HTTP status code.

[src]

Set the HTTP status code.

[src]

Get the HTTP status reason.

[src]

Set the HTTP status reason.

[src]

Get the hashed WebSocket key.

[src]

Get the protocol that the server has decided to use.

[src]

Set the protocol that the server has decided to use.

[src]

Get the extensions that the server has decided to use. If these are unacceptable, it is appropriate to send an Extension close code.

[src]

Add an accepted extension to this response. This may result in duplicate extensions listed.

[src]

Remove an accepted extension from this response. This will remove all configurations of the extension.

[src]

Attempt to parse an HTTP response from a buffer. If the buffer does not contain a complete response, thiw will return Ok(None).

[src]

Construct a new WebSocket handshake HTTP response from a request. This will create a response that ignores protocols and extensions. Edit this response to accept a protocol and extensions as necessary.

[src]

Write a response out to a buffer

Trait Implementations

impl Debug for Response
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Response
[src]

[src]

Formats the value using the given formatter. Read more