HTTP Library

Comprehensive guide to HTTP in Linea

HTTP Library

The http module provides request helpers for service integration and API calls.

import http

var body = http::get("https://example.com")
display body

POST Example

import http

var payload @ str = "{\"name\":\"Linea\"}"
var response = http::post("https://example.com/api", payload)
display response

Tip

Wrap HTTP calls in helper functions and validate response text before parsing.