Hi team,
unable to find proper response ( li_rc = 1) when we use mobile appeon and try to use GET commond
like
li_rc = lnv_HttpClient.SendRequest("GET", "https://1224.com/obtapi/api/obrpendingorders")
(found li_rc = 0)
kindly suggest how to use GET command
//string ls_response,ls_responsestring,ls_file
Integer li_rc, li_StatusCode
String ls_ContentType, ls_body, ls_string, ls_text, ls_json_string, ls_rec, ls_ym
HttpClient lnv_HttpClient
lnv_HttpClient = Create HttpClient
lnv_HttpClient.SetRequestHeader("Content-Type", "application/json;charset=UTF-8")
li_rc = lnv_HttpClient.SendRequest("GET", "https://1234.com/obtapi/api/obrpendingorders")
IF li_rc <> 1 THEN
messagebox('http','request failed' + string(li_rc))
RETURN
END IF
lnv_HttpClient.getresponsebody(ls_response)
if fileexists("c:\temp\"+"responsesaledata"+string(today(),"_ddmmyy_")+string(now(),"hhmmss")+".json") = true then
filedelete("c:\temp\"+"responsesaledata"+string(today(),"-ddmmyy_")+string(now(),"hhmmss")+".json")
end if
ls_file = "c:\temp\"+"responsesaledata"+string(today(),"_ddmmyy_")+string(now(),"hhmmss")+".json"
li_filenum = fileopen(ls_file,linemode!,write!,lockreadwrite!,replace!)
ls_rec = ls_response
//ls_rec = ls_responsestring
filewriteex(li_filenum,ls_rec)
fileclose(li_filenum)