Skip to content

Delete

Performs the request using the DELETE method.

1
myRestRequest.Delete():RestResponse

Returns

A RestResponse instance containing the server's response.

Remarks

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

Examples

Delete a resource

1
2
3
4
$Rest.Create('https://api.example.com/')
    .Request('reservations/{id}')
    .AddUrlParameter('id', $Xml.Evaluate('ReservationId'))
    .Delete();

See Also