WireHttp::put() method

Send a PUT request to a URL

“The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.” More about PUT

Available since version 3.0.222.

Usage

// basic usage
$bool = $http->put(string $url);

// usage with all arguments
$bool = $http->put(string $url, $data = [], array $options = []);

Arguments

NameType(s)Description
urlstring

URL to PUT to (including http:// or https://)

data (optional)array, string

Associative array of data to send (if not already set before), or raw data to send (such as JSON string)

options (optional)array

Optional options to modify default behavior, see the send() method for details.

Return value

bool string

False on failure or string of contents received on success.


$http methods and properties

API reference based on ProcessWire core version 3.0.248

Latest news

  • ProcessWire Weekly #578
    The 578th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 7 June 2025
  • New ProcessWire admin redesign
    When you upgrade to ProcessWire 3.0.248 or newer (currently the dev branch), you’ll immediately notice something new and beautiful…
    Blog / 9 May 2025
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer