HTTP Post application/json

felipermsilva

New member
I'm trying to send an HTTP Post application/json request.

I'm testing on https://webhook.site

But it is not being sent, I get the return code java.net.SocketTimeoutException: connect timed out.

Would I have to do some configuration in the HTTP request for it to work?
 

Endercraft

Moderator (& bug finder :D)
I'm trying to send an HTTP Post application/json request.

I'm testing on https://webhook.site

But it is not being sent, I get the return code java.net.SocketTimeoutException: connect timed out.

Would I have to do some configuration in the HTTP request for it to work?
Have you tried a normal GET request to this site, because it seems like a normal timeout that could happen with network issues.
 

Dimlos

Well-known member
You can test HTTP requests like this, although it is on a different site.
I sent local variables via POST and converted them to JSON from the response.
 

Attachments

  • HTTP_POST_Test.jpg
    HTTP_POST_Test.jpg
    493.9 KB · Views: 35
  • HTTP_POST_Test.macro
    2.8 KB · Views: 24

Dimlos

Well-known member
If you have a Web API that you actually want to use, please provide us with the details and we may be able to create a macro for testing.
 

Dimlos

Well-known member
Solcast API requires an API Key, have you registered and set it up correctly?

-Caution-
Please do not post your API Key on the forum.
 

dudul6395

Member
Hi
Yes i have try all option no answer...
So i try with getw script shell command is not good..
In a web page on chrome api adressing work🥴
 

Dimlos

Well-known member
Your configuration is just wrong.
Try setting api_key and resource_id to local variables in this macro.
 

Attachments

  • Macro.jpg
    Macro.jpg
    242.3 KB · Views: 17
  • Solcast_API.macro
    2.3 KB · Views: 5

Dimlos

Well-known member
The 401 is being played by authentication, is the API key wrong or regulated?
You can only use 10 API calls per day for the same My home PV system only account.
 

Attachments

  • ManageAccount.jpg
    ManageAccount.jpg
    304.5 KB · Views: 9

Dimlos

Well-known member
What is probably wrong is that the API key is not set properly in the Header Params.
 

Attachments

  • HeaderParams.jpg
    HeaderParams.jpg
    218.7 KB · Views: 12

dudul6395

Member
yes it works I did not make myself well understood with my bad English - French translation thank you again for your help and your time spent
 
Top