Skip to content

abstract struct Athena::Framework::Spec::AbstractBrowser
inherits Struct #

Simulates a browser to make requests to some destination.

Note

Currently just acts as a client to make HTTP requests. This type exists to allow for introduction of other functionality in the future.

Direct known subclasses

Athena::Framework::Spec::HTTPBrowser

Constructors#

Methods#

#initialize#

View source

#request(method : String, path : String, headers : HTTP::Headers, body : String | Bytes | IO | Nil) : HTTP::Server::Response#

Makes an HTTP request with the provided method, at the provided path, with the provided body and/or headers and returns the resulting response.

View source

#request(request : ATH::Request | HTTP::Request) : HTTP::Server::Response#

Makes an HTTP request with the provided request, returning the resulting response.

View source