Custom Code Supports External HTTP Requests

Custom Code Supports External HTTP Requests!

September 02, 20242 min read

Gold Star Pro has introduced a significant update to its workflow action capabilities, allowing users to make external HTTP requests directly from custom code actions. This powerful feature is a game-changer for developers, enabling more dynamic and responsive workflows.

What You Can Do with External HTTP Requests

This new feature allows you to interact with external web services, fetch data, and use the information in your custom workflows. You can now use a variety of HTTP methods, including:

  • GET: Retrieve data from a specified resource.

  • POST: Send data to a server to create/update a resource.

  • PUT: Update a resource.

  • PATCH: Apply partial modifications to a resource.

  • DELETE: Remove a specified resource.

  • HEAD: Get the headers returned by the server.

  • OPTIONS: Discover the communication options available for a specific URL.

These methods provide full flexibility in how your workflows interact with external systems, allowing you to create more sophisticated and tailored solutions.

Step-by-Step Guide to Using HTTP Requests in Gold Star Pro

  1. Access the Custom Code Action: Start by creating or editing a workflow that uses the custom code action within Gold Star Pro.

    Access the Custom Code Action

  2. Choose Your HTTP Method: Within the custom code action, select the HTTP method you need (GET, POST, PUT, etc.).

    Choose Your HTTP Method

  3. Enter the URL: A placeholder will appear for you to input the URL of the external resource you wish to interact with.

    Enter the URL

  4. Configure the Request: Add necessary headers, body content, or parameters to your request. This might include authentication tokens or data you wish to send.

  5. Handle the Response: Once the request is made, use the response data in your workflow. You can extract status codes (e.g., 200 for success, 500 for errors) and handle these outcomes appropriately, allowing your workflow to branch based on the response.

Practical Use Cases

  • Data Synchronization: Automatically update customer information from external databases or services.

  • API Integrations: Seamlessly integrate third-party services by sending and receiving data.

  • Error Handling: Create robust workflows that can adapt to different scenarios based on HTTP response codes.

Final Thoughts

This update significantly enhances what you can achieve with Gold Star Pro, offering new possibilities for automation and integration. By enabling HTTP requests within workflows, Gold Star Pro empowers you to build more dynamic and interconnected systems, making your processes more efficient and responsive.

Back to Blog