
The set_header method allows you to set a HTTP request header as part of the request. Name of the parameter to set, or an array of parameters and values. The add_param method allows you to add one or more parameters to the ones already defined. set some options to be used in the request The set_options method allows you to define multiple CURL options to be passed to the request. $curl->set_option(CURLOPT_USERPWD, $username.
#Php curl get request headers password#
set a username and password to be used in the request Usually, this is one of the cURL constants. The set_option method allows you to define a CURL option to be passed to the request. If you prefer to send your request as multipart/form-data, see the If you do not set the Content-Type header while sending a request body, your body will be of the typeĪpplication/x-www-form-urlencoded. For POST requests, they will become the POST body. For GET requests, these will be converted The way these parameters are used depends on the request generated.

Your param array will automatically convert to the respective format when you set the Content-Type header to one of the $curl->set_params(array('form-data' => $params)) The set_params method allows you to set parameters to pass on the HTTP request.


Mixed, defined HTTP method in uppercase, or null if none set. The get_method method allows you to get the current HTTP request method set. The HTTP method (GET, HEAD, POST, PUT, DELETE) to use for this request. The set_method method allows you to set the HTTP request method. note that this only creates the object, it does not execute the request! set_method($method) You can forge an instance of this class through the Request class: The Request_Curl class is mainly intended to process REST requests through PHP's cURL extension, but can be used to fetch
