HTTP Target
  • 09 Sep 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

HTTP Target

  • Dark
    Light
  • PDF

Article summary

The HTTP Target feature enables your application to interact with external HTTP services or web pages by sending HTTP requests and fetching data. This can include calling APIs, retrieving content from web servers, or querying external data sources over the web. Once the HTTP Target sends the request, Composer processes the incoming response. After receiving the data, Composer can forward the response to a specific function defined in the project script, allowing you to handle the data as needed.

One of the key advantages of the HTTP Target is its use of asynchronous calls. This means that the HTTP request is processed in the background, and Composer doesn’t need to wait for the external service to respond before continuing its operations. Even if the response time from the HTTP service is slow or delayed, Composer will continue to execute and render other parts of the application without any significant interruption. This non-blocking behaviour ensures that the performance and responsiveness of your application are maintained, even when interacting with slower external systems.

 

  • Autostart when application starts - self-explanatory

  • HTTP  Endpoint - URL of the HTTP service or web page.

  • Parameters (optional) - optional parameters to add to the HTTP request.

  • Trigger Http Get Command at startup - execute the request as soon as the target starts.

  • Delayed start - delays the request

  • Script callback function (optional)

    • On success - defines the script function name that will be executed as soon as the HTTP request retrieves a response (the response code is 200(OK)).

  • Commands

    • Status - status of the target

    • Execute Http Get - executes the HTTP request.

    • Stop - stops or cancels the HTTP request.

  • Last HTTP request

    • DateTime - date and time of the latest HTTP request.

    • Request - the last HTTP request, including parameters.

    • Status Code - the status code of the last request.

    • Response - the response to the last request.

    • Response time (ms) -  the response time of the last request.

    • Number of requests - the total number of requests.

    • Log message - status message.




Was this article helpful?

What's Next