Search found 4 matches

by moni_66
Tue Jun 06, 2023 12:23 pm
Forum: HTTPAPI
Topic: 400 Bad Request
Replies: 5
Views: 12404

Re: 400 Bad Request

Hi Scott,
now the program run fine, I removed http_setOption('content-type':'text/plain'); and declared it only http_req.
In other similar program, I simply replaced http_post with http_req and now it run fine.
Thanky you very much for your precious support.
Monica
by moni_66
Mon Jun 05, 2023 8:02 am
Forum: HTTPAPI
Topic: 400 Bad Request
Replies: 5
Views: 12404

Re: 400 Bad Request

Hi Scott,
I changed my program as you suggested


postString = 'Field1|Field2|Field3' + x'25'
+ 'Riga1_F1|Riga1_F2|Riga1_F3' + x'25'
+ 'Riga2_F1|Riga2_F2|Riga2_F3' + x'25'
+ 'Riga3_F1|Riga3_F2|Riga3_F3' + x'25';


and

rc1 = http_req( 'POST'
: %trim(url)
: '/users/mob/inviobonfi.txt ...
by moni_66
Fri Jun 02, 2023 12:03 pm
Forum: HTTPAPI
Topic: 400 Bad Request
Replies: 5
Views: 12404

Re: 400 Bad Request

Thank you Scott, today is vacation in Italy, on monday I'll try your suggest.
by moni_66
Thu Jun 01, 2023 3:09 pm
Forum: HTTPAPI
Topic: 400 Bad Request
Replies: 5
Views: 12404

400 Bad Request

Hello,
this is my first time using httpapi functions and I need some help.
I have to send a string to an external webservice and the external company provided me a command that work fine.
I tried to replicate it into rpgle program, but when I run the program I developed, I get 400 Bad Request error ...