Skip to main content

Module http

Module http 

Source
Expand description

HTTP request/response helpers for testing. HTTP test utilities for Reinhardt framework

Provides helper functions for creating and manipulating HTTP requests and responses in tests.

Structs§

Request
HTTP Request representation
Response
HTTP Response representation

Enums§

Error
The main error type for the Reinhardt framework.

Functions§

assert_has_header
Assert response has header
assert_header_contains
Assert header contains substring
assert_header_equals
Assert header value equals expected
assert_no_header
Assert response doesn’t have header
assert_status
Assert response status code
create_insecure_request
Create a mock HTTP request (non-secure)
create_request
Create a test HTTP request
create_response_with_headers
Create a response with custom headers
create_response_with_status
Create a response with custom status code
create_secure_request
Create a mock HTTPS request
create_test_request
Create a mock HTTP request for testing with secure/insecure mode
create_test_response
Create a mock response for testing
extract_json
Extract and deserialize JSON from a response
get_header
Get header value from response
has_header
Check if response has a specific header
header_contains
Check if header contains substring
header_equals
Check if header has specific value

Type Aliases§

Result
A convenient Result type alias using reinhardt_core::exception::Error as the error type.