Re: OUATH2
Posted: Mon Apr 29, 2024 4:58 pm
I am getting a strange result when using HTTP_req
0136.00 dcl-s RESULTS varchar(1600000) ;
0436.00 rc = http_req( 'POST'
0437.00 :'https://wwwcie.ups.com/security/v1/oauth/token'
0438.00 : *omit
0439.00 : resultS // String to receive the results
0440.00 : *omit
0441.00 : 'grant_type=client_credentials'
0442.00 : 'application/x-www-form-urlencoded');
When i look at the string results and compare it to the data that came back into my log on the ifs. The results string is shorter than the string I see in the log file. The field , results only is 1021 where the field in the log is 1481. The log shows I am successful in obtaining the token.
r Browse : /home/mydebuglog.txt
Record : 115 of 132 by 18 Column : 1 1481 by 31
Control :
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....0....+....1....+....2....+....3.
Connection: keep-alive
Server-Timing: cdn-cache; desc=MISS
Server-Timing: edge; dur=6
Server-Timing: origin; dur=301
ak-grn-1: 0.05931ab8.1714408008.28d4634b
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
Server-Timing: ak_p; desc="1714408008841_3088749317_685007691_30717_7775_59_76_-";dur=1
SetError() #13: HTTP/1.1 200 OK
recvresp(): end with 200
recvdoc parms: identity 1481
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
recvdoc(): Receiving 1481 bytes.
{"token_type":"Bearer","issued_at":"1714408009193","client_id":"TyC9QTHSNd8JG9m4Nwg6HfAFKgAg150zVPVfqvELbaQANyg0","access_token":"ey
http_close(): entered
************End of Data********************
F3=Exit F10=Display Hex F12=Cancel F15=Services F16=Repeat find F19=Left F20=Right
Any help wiil be greatly appreciated
thanks
Bruce
0136.00 dcl-s RESULTS varchar(1600000) ;
0436.00 rc = http_req( 'POST'
0437.00 :'https://wwwcie.ups.com/security/v1/oauth/token'
0438.00 : *omit
0439.00 : resultS // String to receive the results
0440.00 : *omit
0441.00 : 'grant_type=client_credentials'
0442.00 : 'application/x-www-form-urlencoded');
When i look at the string results and compare it to the data that came back into my log on the ifs. The results string is shorter than the string I see in the log file. The field , results only is 1021 where the field in the log is 1481. The log shows I am successful in obtaining the token.
r Browse : /home/mydebuglog.txt
Record : 115 of 132 by 18 Column : 1 1481 by 31
Control :
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....0....+....1....+....2....+....3.
Connection: keep-alive
Server-Timing: cdn-cache; desc=MISS
Server-Timing: edge; dur=6
Server-Timing: origin; dur=301
ak-grn-1: 0.05931ab8.1714408008.28d4634b
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
Server-Timing: ak_p; desc="1714408008841_3088749317_685007691_30717_7775_59_76_-";dur=1
SetError() #13: HTTP/1.1 200 OK
recvresp(): end with 200
recvdoc parms: identity 1481
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
recvdoc(): Receiving 1481 bytes.
{"token_type":"Bearer","issued_at":"1714408009193","client_id":"TyC9QTHSNd8JG9m4Nwg6HfAFKgAg150zVPVfqvELbaQANyg0","access_token":"ey
http_close(): entered
************End of Data********************
F3=Exit F10=Display Hex F12=Cancel F15=Services F16=Repeat find F19=Left F20=Right
Any help wiil be greatly appreciated
thanks
Bruce