Performs a POST request. Used for pretty much everything.
public post ( string $endpoint, array $data, array $params, boolean $multipart = FALSE ) : mixed | ||
$endpoint | string | The address of the resource being requested (e.g. '/update_snaps' or '/friend'). |
$data | array | An dictionary of values to send to the API. A request token is added automatically. |
$params | array | An array containing the parameters used to generate the request token. |
$multipart | boolean | If TRUE, sends the request as multipart/form-data. Defaults to FALSE. |
return | mixed | The data returned from the API (decoded if JSON). Returns FALSE if the request failed. |