class

Sellia::CLI::LocalProxy

Inherits Reference / Object

LocalProxy forwards HTTP requests to a local service. It handles making the actual HTTP request to the local server and returns the response status, headers, and body.

Constructors

new(host : String = "localhost", port : Int32 = 3000)
Source

Instance methods

forward(method : String, path : String, headers : Hash(String, Array(String)), body : IO | Nil) : Tuple(Int32, Hash(String, Array(String)), IO)

Forward an HTTP request to the local service. Returns a tuple of (status_code, response_headers, response_body_io)

Source
host
Source
host=(host : String)
Source
port
Source
port=(port : Int32)
Source