class

Pterodactyl::HttpClient

Inherits Reference < Object

Constants

HTTP_METHODS = ["get", "delete", "post", "put", "patch"] of ::String

Constructors

new(base_url : String, token : String, use_content : Bool = true)
Source

Instance methods

base_url
Source
base_url=(base_url : String)
Source
delete(path : String, body : String = "") : HTTP::Client::Response

Performs a DELETE on the path with the given body

Source
get(path : String, body : String = "") : HTTP::Client::Response

Performs a GET on the path with the given body

Source
patch(path : String, body : String = "") : HTTP::Client::Response

Performs a PATCH on the path with the given body

Source
post(path : String, body : String = "") : HTTP::Client::Response

Performs a POST on the path with the given body

Source
put(path : String, body : String = "") : HTTP::Client::Response

Performs a PUT on the path with the given body

Source
set_host(url : String)

Sets the base url. Alias of base_url=.

Source
token
Source
token=(token : String)
Source
uri

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

Source
use_content
Source
use_content=(use_content : Bool)
Source