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
  • Functionality
  • Invocation
  • Examples

Was this helpful?

  1. Platform
  2. Keywords

lam.httpRequest

Learn more about the httpRequest Keyword

Previouslam.asyncExecuteNextlam.httpRequests

Last updated 1 month ago

Was this helpful?

Functionality

The httpRequest keyword makes an HTTP request to the specified endpoint with the given parameters. The response will be stored in the flow's response object. For multiple parallel requests, see .

Invocation

Data transformation must output:

{
  "lam.httpRequest": {
    "method": "POST",
    "url": "https://api.example.com/endpoint",
    "pathParams": { /* optional */ },
    "queryParams": { /* optional */ },
    "headers": { /* optional */ },
    "body": { /* optional */ }
  }
}
Key
Description
Type
Required

method

HTTP method (GET, POST, PUT, DELETE)

String

Yes

url

Destination URL

String

Yes

pathParams

URL path parameters

Object

No

queryParams

URL query parameters

Object

No

headers

HTTP headers

Object

No

body

Request body

Object

No

Examples

(payload) => {
  const { input } = payload;
  
  return {
    "lam.httpRequest": {
      "method": "POST",
      "url": "{{props.baseUrl}}/orders/{{orderId}}/items",
      "pathParams": {
        "orderId": input.orderId
      },
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer {{props.apiKey}}"
      },
      "body": {
        "quantity": input.quantity,
        "notes": input.notes
      }
    }
  };
}
lam.httpRequests