class FleetApp::Client

Overview

An interface for HTTP::Client.

Defined in:

fleet_app/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(host : String = FleetAppClient::HOST) #

[View source]

Instance Method Detail

def base_url : URI #

Returns the base url for which this client will make API requests to.


[View source]
def get(path : String) #

Performs a GET request on the path.


[View source]
def host : String #

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

[View source]
def post(path : String, body : String) #

Performs a POST request on the path with a body.


[View source]
def post_with_auth(path : String, body : String, basic_auth : String) #

Performs a POST request on the path with a body and authentication.


[View source]
def set_host(host : String) #

Sets the host. This method is an alias of the setter method: Alias of #host=.


[View source]