DocsHTTP Clienthttp_session_request

http_session_request

http_session_request

Make an HTTP request within a persistent session. Cookies from previous responses are automatically included. Session defaults (headers, proxy, user agent) are applied but can be overridden per-request. New cookies received are stored in the session for future requests. Ideal for multi-step workflows like login followed by authenticated API calls.

When to use http_session_request

Use http_session_request when you need to automate a browser task. It is part of Owl Browser's HTTP Client toolset and runs inside a self-hosted, source-level stealth engine, so every call inherits the same undetectable browser fingerprint as the rest of your automation — no separate anti-detect setup required.

Usage Example

123456789101112
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.http_session_request(
session_id="value",
url="https://example.com"
)

Parameters

Required

session_idstringrequired

The session ID returned by http_session_create.

urlstringrequired

The full URL to request.

Optional

methodenum
GETPOSTPUTDELETE+3 more

HTTP method. Default: 'GET'

headersobject

Additional HTTP headers as a JSON object or string. Merged with session default headers.

bodystring

Request body content.

cookiesstring

Additional cookies for this request. Accepts string or JSON array from browser_get_cookies.

auth_typeenum
nonebasicbearerdigest

Authentication type for this request.

auth_usernamestring

Username for authentication.

auth_passwordstring

Password for authentication.

auth_tokenstring

Bearer token for authentication.

follow_redirectsboolean

Override session redirect behavior.

timeoutinteger

Request timeout in milliseconds.

connect_timeoutinteger

Connection timeout in milliseconds.

ssl_verifyboolean

Override session SSL verification.

user_agentstring

Override session User-Agent.

outputenum
textbase64json

Response body output format. Default: 'text'

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}

Frequently Asked Questions

What does http_session_request do?

Make an HTTP request within a persistent session. Cookies from previous responses are automatically included. Session defaults (headers, proxy, user agent) are applied but can be overridden per-request. New cookies received are stored in the session for future requests. Ideal for multi-step workflows like login followed by authenticated API calls. It belongs to Owl Browser's HTTP Client category and is available through the REST API, the Python SDK (browser.http_session_request()), the Node.js SDK, and the MCP server.

What parameters does http_session_request accept?

http_session_request accepts 2 required parameters (session_id, url) and 14 optional parameters. All parameters are sent as JSON in a POST request to /api/execute/http_session_request.

Is http_session_request detectable by anti-bot systems like Cloudflare or DataDome?

No. http_session_request executes inside Owl Browser's Chromium engine, which applies fingerprint spoofing at the C++ source level rather than through JavaScript patches. Every tool call shares the same consistent, human-like fingerprint, so anti-bot systems such as Cloudflare, DataDome, and Akamai see an ordinary browser.

Related Tools

http_request

Make an HTTP/HTTPS request with full control over method, headers, body, authentication, proxy, and TLS settings. Supports GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS methods. Includes proxy support (HTTP, HTTPS, SOCKS4, SOCKS5, SOCKS5H) and built-in Tor integration for anonymous requests. Returns status code, response headers, body, timing information, and redirect details. Use 'output' parameter to control body format: 'text' for UTF-8, 'base64' for binary content, 'json' for parsed JSON.

http_session_create

Create a persistent HTTP session with automatic cookie management. Cookies received from servers are stored and automatically sent with subsequent requests in the same session. Configure default headers, proxy, user agent, and TLS settings that apply to all requests in the session. Returns a session_id for use with http_session_request and other session tools. Maximum 64 concurrent sessions.

http_session_close

Close and destroy an HTTP session, freeing all stored cookies and resources. The session_id becomes invalid after this call.

http_session_list

List all active HTTP sessions with their IDs, creation time, last used time, request count, and configuration summary. Useful for managing multiple concurrent sessions.

browser_create_context

Create a new isolated browser context with its own cookies, storage, and optional proxy configuration. Each context acts as an independent browser session. Use this to create multiple isolated browsing sessions, configure proxy/Tor connections, load browser profiles with saved fingerprints, and enable/disable LLM features. Returns a context_id to use with other browser tools.

browser_navigate

Navigate the browser to a specified URL. This is a non-blocking operation that starts navigation and returns immediately. Use browser_wait_for_network_idle or browser_wait_for_selector to wait for the page to fully load. Supports HTTP, HTTPS, file, and data URLs. When wait_until is set (load, networkidle, fullscroll, domcontentloaded) and the page declares WebMCP tools, the response includes a webmcp_tools array containing the full tool definitions (name, description, inputSchema). Use browser_webmcp_call_tool to execute any of these tools directly.

Browse the full Owl Browser API reference or get started with the Python SDK and Node.js SDK.