Connect to API using Web and error 1110

Hi, I am trying to send a POST request to connect to an API link , this link only accepts POST request and it needs the information contains in a JSON file that for the purpose of my app needs to have one field dynamicaly setted.

I have received both error 1110 for the web-headers and 1103 for the text-content.
The original command to connect would be : POST https://dev.youteach.ai:7092/stream with a JSON to go with it that contains authorization keys and a question that needs to be dynamicaly set.
Here is what I have tried, I have initialy used a dictionary instead of a make list like in the picture but the outcome is the same.
Any help would be very appreciated

I have also looked through some links in this forum and tried to follow the answers and they have not help: How do you send and receive data from an external api using Web / WebView?

P/s, the ids in the script have been changed for obfusucation purposes.

In the headers, no need the " and :

The format of the post text is not a valid json. Use 'do it' to check the joined string.

You are missing a trailing quote for premium.

\ is a nightmare.

Also in the headers, remove the colon : and all the quotes "

In the posttext, you may need to add double quotes around your variables as well.

And you have commas missing after your variables.

A link to the api documentation may be useful.

I was just given the api to work on, there is no documentation.
if it work, tested using Postman, it would give a stream of unformatted unicode back.

"user_type":"premium" is the last field, but still need a comma?,

Here is the editted block as you asked
It still does not accept the header, say "Element 1 is not a list" still
What do you mean by do it block?


Given error

1 Like

You still need to put double quotes around your two variables: "global active_docs" and "question"

and you need a comma before "conversation_id"

You do not need a comma after "premium"

For the headers there should be another make a list block with just one socket before the list you have made

The variables that I have already have quotes around them
Please see the picture, there is already commas seperating the values also.

image

where does it come from ?

You do not make it easy for us to help by hiding characters in variables we cannot see....

Have you edited the header blocks yet ?

Yes, I have editted the header blocks, the header got accepted now.
Thank you
I initiated the active_docs variable as a string, they do have quotes around the string and ended with a comma next to the double quotes

Is it working now ?

I am downloading it for another try

It still does not work for the JSON

Here is the whole error pic

Here is the whole current block if it helps
I use a join operation for the question as the input point to enclose it in quotation marks


Heres the result from postman, so the url is valid

Why does Postman say you have 9 headers but your blocks only have 1?

Those are default headers generated by postman, I did not think them to be relevant

considering content-length varies and the actual user-agent unknown, as well as not running a postman on the app itself,
some headers have been omitted:

Update, I still have the same error as aboveL 1103 with the JSON content being printed out

Show us the call statement where you invoke your procedure and feed it the question value.

Do you supply the missing " " in the call?

I am guessing you did not wrap question in quotes in the call, (who would guess to do that?), and you need to supply quotes in the two surrounding text blocks.