Midio docs
  • Getting Started
    • Welcome
    • Quick Start Guide
  • Your First Midio App
  • Guides
    • HTTP
      • Making HTTP Requests
      • Responding to HTTP Requests
      • How to reach your own endpoints
      • CORS
      • Server-Sent Events (SSE)
    • Branching
    • Loops
    • Map, filter, reduce
    • Working with Data
    • Expressions
    • Building Agents
      • Streaming Agent API (experimental)
    • Debugging
    • Secrets and Environment variables
    • Convert JSON to data nodes
    • Writing tests
    • Cleaning up your flows
  • Package Manager
  • Integrating with third party services
  • Troubleshooting
  • Tutorials
    • Connecting LLMs to MCP-servers using the MCP-client package
    • Making Your Own MCP Server in Midio
    • A Fast Path to Functional RAG Agents
    • How to build a streaming agent using Server-Sent Events (SSE)
  • Reference
    • The Midio Editor
      • The Node Editor
      • User Traces
      • Traces (execution)
      • Processes
      • Log
      • Services
      • Problems
      • Function Signature
      • Data
      • Settings
    • The Midio Language
      • Nodes and execution
      • Functions and Events
        • Anonymous functions
      • Modules
      • Contexts
      • Data type
      • Local variables
      • Portals
      • Waypoint node
      • Partial function application
  • The Midio Engine
  • Built in Nodes
    • Core (std)
    • HTTP
    • LLM
Powered by GitBook
On this page
  • HTTP
  • Endpoint
  • Response
  • Fetch
  • FetchStreamed
  • NextMessage
  • Url
  • UrlEncodeFormData
  • UrlEncodeString
  • UrlDecodeString
  • UrlDecodeComponent
  • Advanced
  • Client

Was this helpful?

Edit on GitHub
  1. Built in Nodes

HTTP

The Http package contains various functions and events for performing and responding to HTTP requests.

PreviousCore (std)NextLLM

Last updated 2 months ago

Was this helpful?

HTTP

Endpoint

Listens for http requests on the provided path and method. path is an url of the form some/path/, which can be parameterized by :name for path items, and ?query_name&another_query_name for query values. Example: 'user/:name?email&joined_date' This creates name, email and joined_date output properties that one can use to get these values from the request. NOTE: All endpoints currently shares a single http server.

Response

Responds to an HTTP request provided by an Http.Endpoint event. This function must be called downstream from an Http.Endpoint in order to have anything to respond to.

Fetch

Performs a simple http/https request to the provided url and returns the response as a string, buffer or object depending on the value of response type, which can be 'text', 'buffer' or 'json'. The body input will be converted to json if it is anything other than a String or Null.

FetchStreamed

Performs an http request to the given url, expecting it to respond with a SSE-stream, messages from which can be read using Http.NextMessage.

NextMessage

Reads the next message from the SSE stream. This function must be called downstream from a call to `Http.FetchUrlStreamed`.

Url

UrlEncodeFormData

UrlEncodeString

UrlDecodeString

UrlDecodeComponent

Advanced

Client

The Http Clientmodule contains a lower level API for performing Http requests. Http FetchUrl and Http FetchStreamed should cover most use-cases.

OpenNetworkStream

Opens a new network stream.

CreateRequest

SendRequest

ResponseBodyStream

Streams content from a response body as descrete events.

ResponseStatus

ResponseHeaders

ResponseBody