|
Ok, Got this working but not understanding why.
Response is a blank field.
Request = %Trim(Url2) + %Trim(%EditC(EntCustNo : 'Z'));
SendStr = %Trim(Url2) + %Trim(%EditC(EntCustNo : 'Z'));
// Call API
rc = http_req('PUT'
: Request
: *omit
: Response
: *omit
: SendStr
: *omit);
I tried Request without CustNo and Custno in SendStr. Failed
I tried Request without CustNo and URL + CustNo. It made it to server but
no CustNo.
Put URL + CustNo in both Request and SendStr and it worked!
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
(WalzCraft) Jerry Forss
Sent: Thursday, August 10, 2023 9:05 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: [EXTERNAL] http_req(PUT
I did change the values and got a bit further, I think but still not
working.
rc = http_req('PUT'
: Request
: *omit
: Response
: *omit
: *omit
: *omit);
Bottom of Log - A bit longer
recvresp(): entered
HTTP/1.1 411 Length Required
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 10 Aug 2023 13:48:03 GMT
Connection: close
Content-Length: 344
SetError() #13: HTTP/1.1 411 Length Required
recvresp(): end with 411
recvdoc parms: identity 344
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
recvdoc(): Receiving 344 bytes.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""
http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE> <META HTTP-EQUIV="Content-Type"
Content="text/html; charset=us-ascii"></HEAD> <BODY><h2>Length
Required</h2> <hr><p>HTTP Error 411. The request must be chunked or have a
content length.</p> </BODY></HTML>
SetError() #13: HTTP/1.1 411 Length Required
http_close(): entered
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Greg
Wilburn
Sent: Thursday, August 10, 2023 8:31 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: [EXTERNAL] http_req(PUT
Jerry,
I'd check the value in your RESPONSE variable... sounds like the path on
your IFS doesn't exist.
If it's not returning a payload, try supplying a variable in the 4th
parameter and *OMIT in the 3rd (why write an empty stream file?).
HTH
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
(WalzCraft) Jerry Forss
Sent: Thursday, August 10, 2023 8:26 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] http_req(PUT
Hi All
I have done many web service calls to the outside for carrier rates using
URL/json or xml and getting back json or xml.
We have a new project where we want to call a service on our network.
It would be just a PUT request with a URL with a parameter. No returned
data. Just the success code.
It is just telling the network pgm to do something.
This is what I am doing.
Request = 'http://99.999.99.99:9999/api/DormantCustomer/780';
rc = http_req('PUT'
: Request
: Response
: *omit
: *omit
: *omit
: *omit);
This is the log
HTTPAPI Ver 1.41 released 2020-06-05
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R3M0
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
SetError() #22: open(): No such path or directory.
I can ping the IP from the IBMi.
What am I doing wrong?
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change
specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged
information that is protected by law. The information contained herein is
transmitted for the sole use of the intended recipient(s) and should "only"
pertain to "WalzCraft" company matters. If you are not the intended
recipient or designated agent of the recipient of such information, you are
hereby notified that any use, dissemination, copying or retention of this
email or the information contained herein is strictly prohibited and may
subject you to penalties under federal and/or state law. If you received
this email in error, please notify the sender immediately and permanently
delete this email. Thank You
WalzCraft PO Box 1748 La Crosse, WI, 54602-1748 www.walzcraft.com<
http://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
[CAUTION! This email originated outside of the organization. Please do not
open attachments or click links from an unknown or suspicious origin.]
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change
specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged
information that is protected by law. The information contained herein is
transmitted for the sole use of the intended recipient(s) and should "only"
pertain to "WalzCraft" company matters. If you are not the intended
recipient or designated agent of the recipient of such information, you are
hereby notified that any use, dissemination, copying or retention of this
email or the information contained herein is strictly prohibited and may
subject you to penalties under federal and/or state law. If you received
this email in error, please notify the sender immediately and permanently
delete this email. Thank You
WalzCraft PO Box 1748 La Crosse, WI, 54602-1748 www.walzcraft.com<
http://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change
specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged
information that is protected by law. The information contained herein is
transmitted for the sole use of the intended recipient(s) and should "only"
pertain to "WalzCraft" company matters. If you are not the intended
recipient or designated agent of the recipient of such information, you are
hereby notified that any use, dissemination, copying or retention of this
email or the information contained herein is strictly prohibited and may
subject you to penalties under federal and/or state law. If you received
this email in error, please notify the sender immediately and permanently
delete this email. Thank You
WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
www.walzcraft.com<http://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
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.