Functions

easy_http.inc

easy http

Function Type Description
ezhttp_cancel_request native Cancels a request.
ezhttp_create_options native Creates new options object. This object allows you to configure your request by specifying
such parameters as user agent, query parameters, headers, and etc.
Options are reusable request templates. Their values are copied into a request when it is sent.
By default the options handle is destroyed automatically when the last request using it finishes.
ezhttp_create_queue native Creates a new HTTP request queue. Requests in the queue are executed sequentially.
ezhttp_delete native Performs a DELETE request.
ezhttp_destroy_options native Destroys an options object previously created via ezhttp_create_options().
It is safe to destroy an options object after sending a request because the request keeps its own snapshot.
This is mainly useful when ezhttp_create_options(.auto_destroy = false) was used or when you want eager cleanup.
ezhttp_ftp_download native Downloads a file from a remote server using FTP.
ezhttp_ftp_download2 native Downloads a file from a remote server using FTP by URI.
ezhttp_ftp_upload native Uploads a file to a remote server using FTP.
ezhttp_ftp_upload2 native Uploads a file to a remote server using FTP by URI.
ezhttp_get native Performs a GET request.
ezhttp_get_cookies native Returns a cookie value by name.
ezhttp_get_cookies_count native Returns the number of cookies in the response.
ezhttp_get_data native Gets the response data of the request.
ezhttp_get_downloaded_bytes native Returns the number of bytes downloaded in the request.
ezhttp_get_elapsed native Returns the elapsed time of the request in seconds.
ezhttp_get_error_code native Returns the error code of the connection failure of the request.
ezhttp_get_error_message native Returns the error message of the request.
ezhttp_get_headers native Returns a header value by name.
ezhttp_get_headers_count native Returns the number of headers in the response.
ezhttp_get_http_code native Gets the HTTP status code of the request.
ezhttp_get_redirect_count native Returns the number of redirects in the request.
ezhttp_get_uploaded_bytes native Returns the number of bytes uploaded in the request.
ezhttp_get_url native Returns the URL of the request.
ezhttp_get_user_data native Returns the custom data associated with the request set by ezhttp_option_set_user_data.
This is the snapshot captured when the request was sent.
ezhttp_is_request_exists native Checks if a request exists.
ezhttp_option_add_form_payload native Adds a key-value pair to the form payload.
ezhttp_option_add_url_parameter native Adds a query parameter to the URL.
ezhttp_option_append_body native Appends a body to the HTTP request.
ezhttp_option_set_auth native Sets an authentication for the HTTP request.
ezhttp_option_set_body native Sets the request body.
ezhttp_option_set_body_from_json native Copies serialized string to the requests body.
ezhttp_option_set_connect_timeout native Sets a connect timeout for the HTTP request.
ezhttp_option_set_cookie native Sets a cookie for the HTTP request.
ezhttp_option_set_header native Sets a header for the HTTP request.
ezhttp_option_set_plugin_end_behaviour native Sets a plugin end behaviour for the HTTP request.
ezhttp_option_set_proxy native Sets a proxy for the HTTP request.
ezhttp_option_set_proxy_auth native Sets a proxy authentication for the HTTP request.
ezhttp_option_set_queue native Sets a queue for the HTTP request.
Queues allow you to run all the requests in the queue sequentially (in the order they were called).
ezhttp_option_set_timeout native Sets a timeout for the HTTP request.
ezhttp_option_set_user_agent native Sets user-agent string for a request.
ezhttp_option_set_user_data native Sets a custom request data for the HTTP request.
The data is copied into the request when it is sent, so reusing or destroying the options later is safe.
ezhttp_parse_json_response native Parses http response body to JSON.
ezhttp_patch native Performs a PATCH request.
ezhttp_post native Performs a POST request.
ezhttp_put native Performs a PUT request.
ezhttp_request_progress native Gets the request progress.
ezhttp_save_data_to_file native Saves the request data to a file.
ezhttp_save_data_to_file2 native Saves the request data to a file.