HttpDelete - cHttpClient¶
Include: Use System\Http.pkg
Sends a DELETE request with optional body and content type.
Type: Function
Return data type: HttpStatus, which is an alias for UShort
Parameters¶
| Parameter | Type | Description |
|---|---|---|
sPath |
String | Relative path or absolute URL. |
vBody |
Variant | Request body. Strings are sent as text/plain, UChar[] values are sent as application/octet-stream, and structs/arrays/other Variant values are serialized to JSON as application/json unless sContentType or Content-Type overrides it. |
sContentType |
String | Optional content type. When omitted, cHttpClient selects a content type from the body value or uses the existing Content-Type request header. |
Syntax¶
Function HttpDelete String sPath {Variant vBody} {String sContentType} Returns HttpStatus
Call¶
Get HttpDelete of hoObj "/delete" to eStatus
Description¶
Sends DELETE with an optional request body and optional content type. See Automatic request body serialization.
Examples¶
No request body¶
Get HttpDelete of hoObj "/delete" to eStatus
Optional JSON body¶
HttpDT1 oUsr
Move "demo" to oUsr.sUsername
Get HttpDelete of hoObj "/delete" oUsr to eStatus