Skip to main content

Module protocol

Module protocol 

Source
Expand description

Reads values back out of rendered responses: bodies, cookies, form data, and the semantic HTML queries over tables, fields, and filters.

Re-exported for compatibility by tablo-test, whose client drives the requests these helpers read.

Re-exports§

pub use dom::FilterOption;
pub use dom::Row;
pub use dom::RowActions;
pub use dom::field_error;
pub use dom::filter_options;
pub use dom::row_actions;
pub use dom::rows;

Modules§

dom
Semantic queries over rendered HTML for tests.

Constants§

SESSION_COOKIE
Names the session cookie Topcoat’s default token store writes.

Functions§

body_bytes
Collect a response body as bytes.
body_string
Collect a response body as a lossy UTF-8 string.
cookie_header
One Cookie header value from (name, value) pairs, or None when empty.
form_body
URL-encode (key, value) pairs into an urlencoded form body.
input_value
Reads the value of the named <input> in rendered HTML, in either attribute order or quote style.
multipart_body
Builds a multipart body, one part per entry: None is a text part, Some("") the browser’s “no file chosen” part, Some(name) a chosen file.
response_cookies
The (name, value) pairs a response’s Set-Cookie headers carry.
session_cookie_value
The session cookie value a response set, if any.
set_cookie_header
The full Set-Cookie header for name, so tests can assert attributes.