Search found 9 matches

by AS400Guy
Thu Jun 04, 2026 10:18 am
Forum: HTTPAPI
Topic: v1.52 - Getting "Pointer not set" error on http_url_post_stmf() call.
Replies: 2
Views: 72855

Re: v1.52 - Getting "Pointer not set" error on http_url_post_stmf() call.

Hi,
I got the same error (Pointer not set for location referenced' after upgrade to the latest version.

We don't pass the parameter peUserAgent (and soapaction) but it is ALWAYS required when calling http_url_post_raw2. wwUserAgent is not filled and it collapses.

It seems there's no 'else' built ...
by AS400Guy
Wed Jul 10, 2024 9:56 am
Forum: HTTPAPI
Topic: comm_blockread failed! / large jsonfile
Replies: 3
Views: 19750

Re: comm_blockread failed! / large jsonfile

Hi Scott,
A very strange situation.
Today it's working. I didn't change anything at my side...
by AS400Guy
Tue Jul 09, 2024 10:14 am
Forum: HTTPAPI
Topic: comm_blockread failed! / large jsonfile
Replies: 3
Views: 19750

comm_blockread failed! / large jsonfile

Hello,
I've a problem with a large jsonfile.
It is chunked in different blocks, but it looks like the last block crashes.
I got an error: 'comm_blockread failed!'.

See below the relevant part of the log:

chunk size = 8192
get_chunk_size returned 8192
calling comm_blockread

{"Orders ...
by AS400Guy
Wed Oct 04, 2023 11:47 am
Forum: HTTPAPI
Topic: Unauthenticated
Replies: 11
Views: 78709

Re: Unauthenticated

Ok,
Thank you for this information. An extra reason to use the HTTP_AUTH_USRDFN option!
Kind regards.
by AS400Guy
Thu Sep 28, 2023 8:09 am
Forum: HTTPAPI
Topic: Unauthenticated
Replies: 11
Views: 78709

Re: Unauthenticated

Hi Scott,

I've copied this also exactly in my code (so without the words 'API key') and that works! Great!

Problem solved.

Afterwards looking to the original code I have to take the conclusion that only the '+ CRLF' (x'0d25') was missing in the authorization header...
(I don't know exactly why ...
by AS400Guy
Tue Sep 26, 2023 7:50 am
Forum: HTTPAPI
Topic: Unauthenticated
Replies: 11
Views: 78709

Re: Unauthenticated

Hello Scott,

A working token looks like (example of Postman):

Content-Type: application/json
Authorization: xelion 40938a438a479fa277b7f712179fa277b7f7121190c40e1080027d137d73556666e79dbbfdac01f
User-Agent: PostmanRuntime/7.33.0
Accept: */*
Postman-Token: f190fbef-f226-465a-9392-4089786aea8e
Host ...
by AS400Guy
Mon Sep 25, 2023 2:04 pm
Forum: HTTPAPI
Topic: Unauthenticated
Replies: 11
Views: 78709

Re: Unauthenticated

Hi Scott,
I Use API key xelion because in another example discussed here 'Bearer token' was used. So I suggested I had to use 'API key'.
xelion + a token is the value I have to use in Postman.

Unfortunately if I only send 'Authorization: ' + the token I get the same error.

Thank you for the tip ...
by AS400Guy
Mon Sep 25, 2023 12:41 pm
Forum: HTTPAPI
Topic: Unauthenticated
Replies: 11
Views: 78709

Re: Unauthenticated

Hello Scott,

To begin with the last remark about the CCSID. I'm sorry, I've written a CLLE which calls the RPG with the HTTPAPI and all other stuff in it.
I therefore have a CHGJOB(CCSID37) in my CLLE because I read somewhere this will be necessary to work nice with API's ...
by AS400Guy
Mon Sep 25, 2023 10:31 am
Forum: HTTPAPI
Topic: Unauthenticated
Replies: 11
Views: 78709

Unauthenticated

Hi,

I've a similar problem, but this solution didn't help me.

I will try to explain:
With postman this works.
With HTTPAPI I get the error 'Unauthenicated'.

First we have to get a token. Once the token received we have to add it to the header with API Key

I add it to the header with the http ...