Skip to main content

follow_response

Function follow_response 

Source
pub fn follow_response(url: &str, content_type: &str, body: &str)
Expand description

A form the browser submitted itself (a POST no listener cancelled) is answered with a new document: the browser is at url, the address it posted to, and the document is the response. The document is the one a browser builds for the response’s type: a text/html response is the page it holds — its <head> and <body>, or the markup as the body when it is a fragment; a JSON response is shown in the browser’s JSON viewer, the raw text in a preformatted block; any other response is shown as plain text. The test’s answers for requests survive, as they survive a reload.