Getting error: SetError() #22: open(): No such path or directory.

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
hlhubbard
Posts: 2
Joined: Thu Oct 03, 2024 1:00 am

Getting error: SetError() #22: open(): No such path or directory.

Post by hlhubbard »

Getting error "SetError() #22: open(): No such path or directory. " in my IFS log file when I using


rc = http_get(%trim(fullURL): response);

"fullURL" has the url and the data i'm trying to execute. After I run it the "response" = Blank and

http_debug(*on: '/tmp/smarty_debug.txt'); I'm getting the error in my log file on IFS.

if I copy and paste the URL request in my browser it works. Just not working from the IBMi.

Notes:
1. I can ping the url from the ibmi
2. I'm using HTTPS
3. I'm using http_get
4. rc always return -1
5. I tried the same program on 3 different IBMi system on 3 different networks. Same problem.

Any help. Thanks.
jonboy49
Posts: 244
Joined: Wed Jul 28, 2021 8:18 pm

Re: Getting error: SetError() #22: open(): No such path or directory.

Post by jonboy49 »

It looks to me as if you are mixing up your APIs.

The second parm for http_get is the filename where you want the retrieved response placed. So hardly any wonder that you are being told the file doesn't exist because assumedly it is all blanks.

Maybe you need http_req?
hlhubbard
Posts: 2
Joined: Thu Oct 03, 2024 1:00 am

Re: Getting error: SetError() #22: open(): No such path or directory.

Post by hlhubbard »

OK Thanks a lot! That worked. I included a file name for the second parm and program ran successful. Thanks again.
Post Reply