TsgcHTTP2Client › Methods › Delete
Performs a synchronous HTTP/2 DELETE to remove the resource identified by the URL.
function Delete(const aURL: string): string;
| Name | Type | Description |
|---|---|---|
aURL | const string | Absolute URL of the resource to delete on the server. |
Response body (often a JSON status document) decoded as a string. (string)
DELETE requests typically carry no body. A successful call usually returns 204 No Content with an empty string, or 200 OK with a confirmation document depending on the server.
vResponse := oClient.Delete('https://api.example.com/users/42');
procedure Delete(Const aURL: string; const aResponseContent: TStream);
| Name | Type | Description |
|---|---|---|
aURL | const string | Absolute URL of the resource to delete on the server. |
aResponseContent | const TStream | Stream that collects the server's response body verbatim. |
Stream-based variant that captures the response into a caller-supplied TStream. Choose this overload when the deletion response may be large or needs to be persisted directly to disk.
oOut := TMemoryStream.Create;
try
oClient.Delete('https://api.example.com/users/42', oOut);
finally
oOut.Free;
end;