class Pterodactyl::HttpClient
- Pterodactyl::HttpClient
- Reference
- Object
Defined in:
pterodactyl/http_client.crConstant Summary
-
HTTP_METHODS =
["get", "delete", "post", "put", "patch"] of ::String
Constructors
Instance Method Summary
- #base_url : String
- #base_url=(base_url : String)
-
#delete(path : String, body : String = "") : HTTP::Client::Response
Performs a DELETE on the path with the given body
-
#get(path : String, body : String = "") : HTTP::Client::Response
Performs a GET on the path with the given body
-
#patch(path : String, body : String = "") : HTTP::Client::Response
Performs a PATCH on the path with the given body
-
#post(path : String, body : String = "") : HTTP::Client::Response
Performs a POST on the path with the given body
-
#put(path : String, body : String = "") : HTTP::Client::Response
Performs a PUT on the path with the given body
-
#set_host(url : String)
Sets the base url.
- #token : String
- #token=(token : String)
-
#uri : URI
Returns the URI for which this client will make API requests to.
- #use_content : Bool
- #use_content=(use_content : Bool)
Constructor Detail
Instance Method Detail
def delete(path : String, body : String = "") : HTTP::Client::Response
#
Performs a DELETE on the path with the given body
def get(path : String, body : String = "") : HTTP::Client::Response
#
Performs a GET on the path with the given body
def patch(path : String, body : String = "") : HTTP::Client::Response
#
Performs a PATCH on the path with the given body
def post(path : String, body : String = "") : HTTP::Client::Response
#
Performs a POST on the path with the given body
def put(path : String, body : String = "") : HTTP::Client::Response
#
Performs a PUT on the path with the given body