Skip to main content
Question

How does httprequest work in a client command?

  • Jul 16, 2024 9:46 AM UTC
  • 7 replies
  • 162 views

durette
Superhero (Customer)
Forum|alt.badge.img+19

Could I get a “Hello World” example of how to make an httprequest in a client command? I’m trying to do something like this:

 

 

7 replies

Forum|alt.badge.img+8
  • Sidekick (Former Employee)
  • Nov 4, 2024 2:40 PM UTC

Hi @durette,
Were you able to run the  httprequest in a client command? 

I was not able to run your “Hello World” example using https://postman-echo.com/get. I encountered the same problem when trying to use the example address below:

httprequest "https://api.open-meteo.com/v1/forecast?latitude=52.2298&longitude=21.0118&current_weather=true"

In debug console (DevTools) I see CORS error.

 

What worked for me were only the very simple examples below:

command TestCommand1 for Xyz {
execute {
httprequest "https://jsonplaceholder.typicode.com/posts/1" into ResponseText {
redirect = true;
method = GET;
header "Accept", "application/json";
}
info("${ResponseText}");
}
}

 

command TestCommand2 for Xyz {
execute {
httprequest "https://httpbin.org/post" into ResponseText {
redirect = true;
method = POST;
header "Content-Type", "application/xml";
body "<note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>";
}
info("${ResponseText}");
}
}



 


Forum|alt.badge.img+5
  • Do Gooder (Partner)
  • Mar 12, 2025 2:17 PM UTC

Hi ​@Tomasz Grzebula  I tried calling this API with my current latitude and longitude as shown below,
 

but I encountered an error.
 

Could you help me understand how to get a response from this API?


Forum|alt.badge.img+8
  • Sidekick (Former Employee)
  • Mar 12, 2025 2:40 PM UTC

​@Lekshmikanth,
According to my experience, apart from very simple examples, httprequest in a client command generally doesn’t work. Additionally it seems to be undocumented feature.


Forum|alt.badge.img+5
  • Do Gooder (Partner)
  • Mar 13, 2025 9:32 AM UTC

Okay Thankyou ​@Tomasz Grzebula 


PhillBronson
Hero (Customer)
Forum|alt.badge.img+13
  • Hero (Customer)
  • Jun 16, 2025 5:52 PM UTC

​@Tomasz Grzebula awesome...

Do you employees have any better/more complete documentation than what is available to Customers?

 


Forum|alt.badge.img+8
  • Sidekick (Former Employee)
  • Jun 17, 2025 8:37 AM UTC

​@PhillBronson, I don't have access to any additional documentation. I just found httprequest in this community and in IFS Developer Studio, and have done some experiments. I guess that httprequest is not documented because it simply doesn't work.


PhillBronson
Hero (Customer)
Forum|alt.badge.img+13
  • Hero (Customer)
  • Jun 17, 2025 8:48 AM UTC

​@Tomasz Grzebula thanks!

 

curiouser and curiouser.