class HTTP::Request

Overview

An HTTP request.

It serves both to perform requests by an HTTP::Client and to represent requests received by an HTTP::Server.

A request always holds an IO as a body. When creating a request with a String or Bytes its body will be a IO::Memory wrapping these, and the Content-Length header will be set appropriately.

NOTE To use Request, you must explicitly import it with require "http/request"

Defined in:

http/request.cr

Instance Method Summary

Instance Method Detail

def action : Orion::Action | Nil #

[View source]
def action=(action : Orion::Action | Nil) #

[View source]
def base_path : String #

[View source]
def base_path=(base_path : String) #

[View source]
def path_params #

Returns the list of path params set by an Orion route.


[View source]