API GET request req.query parameter

Hy Kodular Community, I am Giuseppe, I am an italian guy, so sorry for my english.

I was trying to improve my coding skills by using some API. So i decided to use a type of API that need this parameters for GET:

-url
-req.headers
-req.query

I know How to set url and Headers, but i don’t know how to set the query request.
Help me.
Best regards.

Hello @Giuseppe_Vegas, Welcome to Kodular Community :wink:

It depends on the type of API you are using and the parameters they are accepting to give you the response… but most of the time it is in format of &tag=value.

Also can you tell us more about the APIs you are willing to call and what you have tried yet! Also if possible then upload the screenshot of your blocks so it’ll help others to understand your query and provide you the best solution.

First of all, thanks for answered me.

This is the 3 parameters that I need:
Imgur

and thats the block that I set for url and headers, but i need to set the query request :frowning: but i do not find the true block in kodular.
Imgur

you might want to try the advice of @help_cttricks and add it in the URL like this

.../filter.php?i:Gin

Taifun

Thank you for the idea.

An example of api response is:

So I set my block in this way to get info:

I set the url in this way:
…/filter.php?i:Gin

and i get this error
Imgur

I set the url in this way:
…/filter.php?i=Gin

and i get this error:
Imgur

so I don’t know where is the problem.

@Taifun @help_cttricks

it looks like you get a reasonable resonse from the server now?
what about displaying the result in a label as test to check before continuing with further processing?

Taifun

Thank you @Taifun

You reminded me that when there is an error the best thing to do is to divide the problem into small parts to understand how to solve it.

The mistake was that I used the “TextDecode” block twice.

Love you​:v:

1 Like