×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I am trying to Post to a URL with a username and password to get a token
back using HTTPAPI and YAJL and am getting BAD_REQUEST error. I have also
tried using the following instead of using the yajl set of commands to
generate the JSON-
myJson = '{ "grant_type": "client_credentials" }';
When I debug and check the contents of myJSON, I get junk values-
MYJSON =
....5...10...15...20...25...30...35...40...45
1 'ÅÊ/>ȬÈ`øÁÄ%ÑÁ>ȬÄÊÁÀÁ>ÈÑ/%Ë'
Can someone please help?
Here's the code below-
P getAuthToken B Export
D getAuthToken PI 24A
*
D CRLF C X'0d25'
D rc S 10I 0 Inz
D msg S 80A Inz
D runFlag S N Static
D myJSON S 65535A Varying
D size S 10I 0 Inz
*
D dsLogonDetails DS Static
D dsAuthUsr 24A
D dsAuthPwd 24A
D dsAuthUrl 1024A
*
* getLogonInfo Prototype
D getLogonInfo PR 1072A
*
* Parse Incoming Data from http_url_post_raw
D parseHeader PR 10I 0
D 10I 0 Value
D * Value
D 10I 0 Value
*
/Free
http_debug(*ON : '/tmp/ShubhDebugLog.txt');
Clear authUrl;
// If not run, set static variables
If Not runFlag;
runFlag = *On;
// Get logon info
dsLogonDetails = getLogonInfo();
EndIf;
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.