Skip to content
lsl.devlsl.devLSL Dev

HTTPRequestParam

Constants in the HTTPRequestParam enum.

All constant groups

At a glance, from the LSL definitions
// RequestHTTP_METHOD, string method  // "GET" (default), "POST", "PUT" or "DELETE"HTTP_MIMETYPE, string MIME_type  // request body type; default "text/plain;charset=utf-8"HTTP_CUSTOM_HEADER, string name, string value  // up to 8 per requestHTTP_ACCEPT, string MIME_type  // types for the Accept header; other responses give status 415HTTP_USER_AGENT, string user agent value  // appended to the default; no spacesHTTP_PRAGMA_NO_CACHE, integer send_header  // default TRUE// ResponseHTTP_BODY_MAXLENGTH, integer length  // bytes; default 2048, Mono up to 16384HTTP_EXTENDED_ERROR, integer extended  // errors arrive in http_response as RFC 7807 JSON// Security and diagnosticsHTTP_VERIFY_CERT, integer verify  // default TRUEHTTP_VERBOSE_THROTTLE, integer noisy  // throttle errors on DEBUG_CHANNEL; default TRUE

Constants

Request

ConstantTypeValueDescription
HTTP_METHODinteger0Specifies the HTTP method ('GET', 'POST', 'PUT', or 'DELETE') for the request.
HTTP_MIMETYPEinteger1Specifies the request Content-Type MIME type. Text types should define a charset (e.g., 'text/plain;charset=utf-8'). Use 'application/x-www-form-urlencoded' to emulate HTML forms.
HTTP_CUSTOM_HEADERinteger5Adds custom HTTP headers to the request (up to 8 per request). At the SLua level, provide a string-keyed table mapping header names to values; the serializer emits one HTTP_CUSTOM_HEADER/key/value triple per entry. Some default or sensitive headers are blocked for security reasons.
HTTP_ACCEPTinteger8Used with llHTTPRequest to override the default Accept header with custom MIME types (such as application/json, text/html, etc.). Responses with unlisted content types will return status 415.
HTTP_USER_AGENTinteger7Appends a custom string to the default LSL User-Agent header value. Must follow HTTP standard syntax (e.g., 'My-Script-Name/1.0'). Spaces are not allowed and will cause a script error; use hyphens instead.
HTTP_PRAGMA_NO_CACHEinteger6Controls whether the 'Pragma: no-cache' header is sent with the HTTP request. When SendHeader is TRUE (default), the header is sent; when FALSE, it is omitted.

Response

ConstantTypeValueDescription
HTTP_BODY_MAXLENGTHinteger2Sets the maximum (UTF-8 encoded) byte length of the HTTP response body. The maximum limit depends on the VM being used (Mono Max: 16384 bytes, LSO Max: 4096 bytes).
HTTP_EXTENDED_ERRORinteger9If set to TRUE, llHTTPRequest always returns a key. If an error occurs during the request, detailed error information (delivered in an RFC 7807 JSON block) is reported through the http_response event using that key.

Security and diagnostics

ConstantTypeValueDescription
HTTP_VERIFY_CERTinteger3If set to TRUE, the server's SSL certificate must be verifiable using a standard certificate authority when making HTTPS requests. If FALSE, any SSL certificate is accepted.
HTTP_VERBOSE_THROTTLEinteger4If set to TRUE, shouts error messages to DEBUG_CHANNEL if the outgoing request rate exceeds the server limit. If FALSE, these error messages are suppressed.

Used by