Skip to content

HttpVerbAddrRequest - cBaseHTTPTransfer

Allows you to send a verb of your choosing (like PATCH)

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
sFilePath String Path of the request
aData Address Memory address of the data to be posted
iDataLen Integer
bDataIsFile Integer If True, aData is interpreted as a filename, and the contents of that file are sent as the value. If False, the value of aData is used.
sVerb String Verb to send

Syntax

Function HttpVerbAddrRequest String sFilePath Address aData Integer iDataLen Integer bDataIsFile String sVerb Returns Integer

Call Example

Get HttpVerbAddrRequest sFilePath aData iDataLen bDataIsFile sVerb to IntegerVariable

Description

It allows you to send a verb of your choosing (like PATCH).

This is a low level, but public function. It works just like HTTPPostAddrRequest, except you pass the verb instead of it being built into the method.

And might be used as follows:

Function DoHttpDelete String sFilePath String sData Returns Integer
     Integer bStat
     String sVerb
     Move "DELETE" to sVerb
     Get HttpVerbAddrRequest sFilePath (AddressOf(sData)) (Length(sData)) False  sVerb to bStat
     Function_Return bStat
End_Function

Note this uses the Addr version of the HTTP messages which means you need to deal with addresses and lengths instead of just strings. This is the most flexible method, as you don't need to worry about string size and is most appropriate for this low level message.

Return Value

Returns True if successful, and False otherwise