Unirest\Request::put PHP Method

put() public static method

Send PUT request to a URL
public static put ( string $url, array $headers = [], mixed $body = null, string $username = null, string $password = null ) : unirest\Response
$url string URL to send the PUT request to
$headers array additional headers to send
$body mixed PUT body data
$username string Basic Authentication username (deprecated)
$password string Basic Authentication password (deprecated)
return unirest\Response
    public static function put($url, $headers = array(), $body = null, $username = null, $password = null)
    {
        return self::send(Method::PUT, $url, $body, $headers, $username, $password);
    }

Usage Example

Example #1
0
 public static function put($id, $body = null, $headers = null)
 {
     if (!$headers) {
         $headers = Rapid::getAuthHeader();
     }
     $response = Request::put(Rapid::getUrl(self::$route . '/' . $id), $headers, http_build_query($body));
     return Response::make($response);
 }
All Usage Examples Of Unirest\Request::put