logic_monitor v0.0.6 LogicMonitor.Request
Provides the base request function and helper functions for GET and POST. Requests are authenticated using LMv1 Authentication as described here. All request functions return either {:ok, {status, data}} or {:error, reason}
Summary
Functions
Sends a GET request to the specified resource_path with the specified query_params. Sends multiple requests if negative total is returned (indicating more resources available)
Sends a POST request to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload
Sends a request using the specified method to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload
Types
request_response ::
{:ok, {any, any}} |
{:error, any}
Functions
Specs
get(String.t, String.t) :: request_response
Sends a GET request to the specified resource_path with the specified query_params. Sends multiple requests if negative total is returned (indicating more resources available)
Specs
post(String.t, String.t, String.t) :: request_response
Sends a POST request to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload.
Specs
request(String.t, String.t, String.t, String.t) :: request_response
Sends a request using the specified method to the specified resource_path with the specified query_params (as a string in the form “key1=val1&key2=val2”) and the specified payload.