Lianja
Lianja
HTTP DELETE with Body
See more HTTP Examples
Demonstrates how to send a DELETE request with a body.Chilkat Lianja Downloads
llSuccess = .F.
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
// Use the HttpStr method (or HttpSb) to send a DELETE request with a body.
lcRequestBody = '{ "abc": 123 }'
loResp = createobject("CkHttpResponse")
llSuccess = loHttp.HttpStr("DELETE","https://example.com/something",lcRequestBody,"utf-8","application/json",loResp)
if (llSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loResp
return
endif
? "Response status: " + str(loResp.StatusCode)
? "Response body: "
? loResp.BodyStr
release loHttp
release loResp