1. Sanjay Singh
  2. PowerBuilder
  3. Friday, 11 August 2023 07:58 AM UTC

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)

Sanjay Singh Accepted Answer Pending Moderation
  1. Friday, 11 August 2023 10:25 AM UTC
  2. PowerBuilder
  3. # 1

We are useing power builder 19 R3

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.