struct Loveline::AnonTemplate

Overview

A template consists of all the info needed to make a request, as well as variables that can be interpolated into header and url strings. Templates can be merged together, and thus used as "environments" for requests.

Included Modules

Defined in:

loveline/template.cr

Constant Summary

BLANK = new(address: nil, method: nil, headers: Headers.new, cookies: {} of String => String, variables: {} of String => String, body: nil)

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(*, address : Nil | String, method : Nil | String, headers : Array(Tuple(String, String)), cookies : Hash(String, String), variables : Hash(String, String), body : Nil | String) #

[View source]

Instance Method Detail

def address : String | Nil #

[View source]
def blank? #

[View source]
def body : String | Nil #

[View source]
def cookies : Hash(String, String) #

[View source]
def headers : Loveline::Headers #

[View source]
def method : String | Nil #

[View source]
def variables : Hash(String, String) #

[View source]