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.
Usage Example
Parameters
Required
session_idstringrequiredThe session ID returned by http_session_create.
urlstringrequiredThe full URL to request.
Optional
methodenumGETPOSTPUTDELETE+3 moreHTTP method. Default: 'GET'
headersstringAdditional HTTP headers as a JSON object or string. Merged with session default headers.
bodystringRequest body content.
cookiesstringAdditional cookies for this request. Accepts string or JSON array from browser_get_cookies.
auth_typeenumnonebasicbearerdigestAuthentication type for this request.
auth_usernamestringUsername for authentication.
auth_passwordstringPassword for authentication.
auth_tokenstringBearer token for authentication.
follow_redirectsbooleanOverride session redirect behavior.
timeoutstringRequest timeout in milliseconds.
connect_timeoutstringConnection timeout in milliseconds.
ssl_verifybooleanOverride session SSL verification.
user_agentstringOverride session User-Agent.
outputenumtextbase64jsonResponse body output format. Default: 'text'
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}