Laminar
  • Laminar
  • Platform
    • Overview
    • Getting Started
    • Advanced
      • Configurations
      • HTTP Request Batching
      • Workflow Exit Points
      • Invoke Secondary Workflows
      • Managing Notifications
    • Best Practices
    • Keywords
      • lam.resolveThenExecute
      • lam.exit
      • lam.execute
      • lam.asyncExecute
      • lam.httpRequest
      • lam.httpRequests
  • Concepts
    • Workflows
      • Global Workflow Object
    • Flows
      • Flow Types
        • HTTP Request
        • Data Transformations
      • Flow Runs
      • Supported Languages
    • API Key
    • Configurations
    • API
      • Reference
        • Workspaces
          • Issues
          • Users
          • Invitations
            • Decline
            • Accept
            • Received
            • Created
          • Workflows
          • Flows
          • Auth credentials
          • Api keys
          • Api descriptions
        • Workflow
          • Execute
            • External
          • Flows
          • Executions
        • Users
        • Flows
          • Runs
          • Versions
          • Stats
          • Recent runs
          • Read
        • Configurations
          • Properties
          • Flow credentials
          • Workspace
        • Auth credentials
        • Api descriptions
        • Api keys
        • Transform
          • Test
        • Lami
          • Public
          • Direct
        • Auth
          • Signin
          • Register
          • Refresh
          • Me
          • Users
            • Password
    • Changelog
  • External Links
    • Book a Demo
    • Playground
    • Sign In
  • Specification
Powered by GitBook
On this page

Was this helpful?

  1. Platform
  2. Advanced

HTTP Request Batching

Learn how to running multiple HTTP Requests in one workflow step

When building integrations, engineers may sometimes need to dispatch incoming batch data to different destinations. For example, a high-traffic online retail store receives hundreds of orders that need to be dispatched to different warehouses based on the delivery address through an API call that only accepts one order at a time in the payload.

Laminar solves that problem with the lam.httpRequests keyword in the step editor that allows users to make multiple HTTP requests in parallel.

(payload) => {
  const { input } = payload;
  
  return {
    "lam.httpRequests": [
      {
        "method": "GET",
        "url": "{{props.baseUrl}}/send-to-warehouse/premium",
        "body": input.premiumOrders
      },
      {
        "method": "GET",
        "url": "{{props.baseUrl}}/send-to-warehouse/regular",
        "pathParams": {
          "itemId": input.regularOrders
        }
      }
    ]
  };
}
PreviousConfigurationsNextWorkflow Exit Points

Last updated 1 month ago

Was this helpful?