[][src]Module lab_grader::helpers::web

Functions to easily make web requests

These use the reqwest crate to make requests.

Functions

get

Performs a GET request

get_ip

Gets the public IPv4 address of the machine, if there is one.

post

Posts arbitrary data. This is like post_json but it doesn't set the 'application/json' header.

post_json

Sends a POST request to the url with the given body

site_responds

Just calls get and asserts that the response was successful. Just saves a few lines of code.