\Unirest
Synopsis
class Unirest
{
- // members
- private static boolean $verifyPeer = true;
- private static $socketTimeout = NULL;
- private static array $defaultHeaders = ;
- // methods
- public static void verifyPeer()
- public static void timeout()
- public static void defaultHeader()
- public static void clearDefaultHeaders()
- public static string|stdObj get()
- public static string|stdObj post()
- public static string|stdObj delete()
- public static string|stdObj put()
- public static string|stdObj patch()
- public static void file()
- private static void http_build_query_for_curl()
- private static HttpResponse request()
- private static void getArrayFromQuerystring()
- private static string encodeUrl()
- private static void getHeader()
Members
private
- $defaultHeaders
- $socketTimeout
- $verifyPeer
Methods
private
- encodeUrl() — Ensure that a URL is encoded and safe to use with cURL
- getArrayFromQuerystring()
- getHeader()
- http_build_query_for_curl() — This function is useful for serializing multidimensional arrays, and avoid getting the "Array to string conversion" notice
- request() — Send a cURL request
public
- clearDefaultHeaders() — Clear all the default headers
- defaultHeader() — Set a new default header to send on every request
- delete() — Send DELETE request to a URL
- file() — Prepares a file for upload. To be used inside the parameters declaration for a request.
- get() — Send a GET request to a URL
- patch() — Send PATCH request to a URL
- post() — Send POST request to a URL
- put() — Send PUT request to a URL
- timeout() — Set a timeout
- verifyPeer() — Verify SSL peer