- Kiran Patel
- PowerBuilder
- Friday, 11 December 2020 01:35 PM UTC
When call lnv_HttpClient.SendRequest("GET", lsurl, lsboby)
On some PC it show "Bad Request - Invalid Verb" this error
but it works on postman.
Develop on Appeon PowerBuilder 2019 R2 Build 2353
Deploy on Windows 10 64Bit
My Code
Integer li_rc
String ls_string, lsboby
HttpClient lnv_HttpClient
lnv_HttpClient = Create HttpClient
lnv_HttpClient.SetRequestHeader("Content-Type", "application/json")
string lsurl, lsid, lssql
lsurl = "http://mydomain/myapp/api/sysfunction/sql"
lsid = "test"
lssql = "select item_code, item_name from item_master where item_code = 'CH'"
lsboby = '"{ '
lsboby = lsboby + ' \"corporateid' + '\": \"' + lsid + '\", ~r~n'
lsboby = lsboby + ' \"sql\": \"' + lssql + '\"'
lsboby = lsboby + ' }"'
li_rc = lnv_HttpClient.SendRequest("GET", lsurl, lsboby)
lnv_HttpClient.GetResponseBody(ls_string)
mle_1.text = ls_string
Error:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Verb</h2>
Thank you
Kiran Patel
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.