Delete
- Last UpdatedSep 07, 2018
- 1 minute read
This method is used to call Delete Api endpoint.
Method 1:
IExtensionsWebAPI.Delete(EndPoint, Handler)
Parameters
-
EndPoint: Web Api End point of Get request
-
Handler: Handler Method of Lua script to handle the response JSON data.
Method 2:
IExtensionsWebAPI.Delete(EndPoint, Handler, HeaderCollection)
Parameters
-
EndPoint: Web Api End point of Get request
-
Handler: Handler Method of Lua script to handle the response JSON data.
-
HeaderCollection: Header collection in form of Table
Example
local returnvalue = "something"
function Calculate(params)
local headerCollection = {}
headerCollection["ZUMO-API-VERSION"] = "2.0.0"
local response = IExtensionsWebAPI.Put("https://www.example.com/api/users/2", "Handle", headerCollection)
return returnvalue
end
function Handle(result)
returnvalue = result["data"]["name"]
end