Skip to content

Put

Performs the request using the PUT method.

1
myRestRequest.Put():RestResponse

Returns

A RestResponse instance containing the server's response.

Remarks

This method expects the response status code to be OK (200) or No Content (204), unless RestRequest.Expect is used.

Examples

Replace a resource

1
2
3
4
5
6
7
$Rest.Create('https://api.example.com/')
    .Request('customers/{id}', {
        name : $Xml.Evaluate('Customer/Name'),
        email : $Xml.Evaluate('Customer/Email')
    })
    .AddUrlParameter('id', $Xml.Evaluate('Customer/Id'))
    .Put();

See Also