linxio-js
SDK Reference

Raw HTTP

Low-level request helpers, HTTP client options, retry policy, and response parsing.

Use raw HTTP when you need a tenant-specific or newly discovered endpoint that is not represented by a domain service yet. Raw requests use the same auth, timeout, retry, and token-refresh behavior as service methods.

client.request()

Send a raw API request

linxio.request(method, path, options)

Sends a raw request through the client's HTTP layer.

Caution

Raw HTTP methods are not intended for production use. They are not typed, do not have any guardrails, and are provided for advanced use cases and testing. Where possible, use the domain services instead.

Input

GET | POST | PATCH | PUT | DELETE | HEAD | OPTIONS
required
HTTP method to send.
string
required
API path relative to the configured base URL, or an absolute URL.
object
optional
Object parameter. Expand to see child parameters.
Show child parameters
QueryParams
optional
Query parameters appended to the URL.
unknown
optional
JSON body, FormData, URLSearchParams, string, ArrayBuffer, or Blob.
json | text | blob | arrayBuffer | raw
optional
Response parser override.
Default: json

Headers

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
HeadersInit
optional
Additional HTTP headers for custom or newly discovered endpoints.
string
optional
Sets the Idempotency-Key header for caller-managed retry safety.

Returns

Promise<TResponse>
optional
Parsed response. Raw request methods throw typed SDK errors instead of returning LinxioResult.
LinxioApiError | LinxioNetworkError | LinxioTimeoutError
optional
Typed SDK error when the request fails.
Show child fields
string
required
Safe error message derived from the API response.
number
required
HTTP status code returned by Linxio.
string
optional
HTTP status text returned by Linxio when available.
unknown
optional
Parsed error response body.
string
optional
HTTP method associated with the failed request.
string
optional
API path associated with the failed request.
string
optional
Request identifier from X-Request-Id when Linxio supplies one.

http.get()

Send a GET request

linxio.http.get(path, options)

Sends a low-level GET request and returns the parsed response.

Caution

Raw HTTP methods are not intended for production use. They are not typed, do not have any guardrails, and are provided for advanced use cases and testing. Where possible, use the domain services instead.

Input

string
required
Relative API path or absolute URL.
object
optional
Object parameter. Expand to see child parameters.
Show child parameters
QueryParams
optional
Query parameters appended to the URL.
ResponseType
optional
Parser override.

Headers

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
HeadersInit
optional
Additional HTTP headers.

Returns

Promise<TResponse>
optional
Parsed response body.
optional
Typed SDK error when the request fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

http.post()

Send a POST request

linxio.http.post(path, body, options)

Sends a low-level POST request. JSON-compatible objects are encoded automatically.

Caution

Raw HTTP methods are not intended for production use. They are not typed, do not have any guardrails, and are provided for advanced use cases and testing. Where possible, use the domain services instead.

Input

string
required
Relative API path or absolute URL.
unknown
optional
Request body.

Headers

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
HeadersInit
optional
Additional HTTP headers.
string
optional
Sets the Idempotency-Key header for caller-managed retry safety.

Returns

Promise<TResponse>
optional
Parsed response body.
optional
Typed SDK error when the request fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

http.patch()

Send a PATCH request

linxio.http.patch(path, body, options)

Sends a low-level PATCH request.

Caution

Raw HTTP methods are not intended for production use. They are not typed, do not have any guardrails, and are provided for advanced use cases and testing. Where possible, use the domain services instead.

Input

string
required
Relative API path or absolute URL.
unknown
optional
Request body.
object
optional
Object parameter. Expand to see child parameters.
Show child parameters
QueryParams
optional
Query parameters appended to the URL.
ResponseType
optional
Parser override.

Headers

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
HeadersInit
optional
Additional HTTP headers.
string
optional
Sets the Idempotency-Key header for caller-managed retry safety.

Returns

Promise<TResponse>
optional
Parsed response body.
optional
Typed SDK error when the request fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

http.put()

Send a PUT request

linxio.http.put(path, body, options)

Sends a low-level PUT request.

Caution

Raw HTTP methods are not intended for production use. They are not typed, do not have any guardrails, and are provided for advanced use cases and testing. Where possible, use the domain services instead.

Input

string
required
Relative API path or absolute URL.
unknown
optional
Request body.
object
optional
Object parameter. Expand to see child parameters.
Show child parameters
QueryParams
optional
Query parameters appended to the URL.
ResponseType
optional
Parser override.

Headers

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
HeadersInit
optional
Additional HTTP headers.
string
optional
Sets the Idempotency-Key header for caller-managed retry safety.

Returns

Promise<TResponse>
optional
Parsed response body.
optional
Typed SDK error when the request fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

http.delete()

Send a DELETE request

linxio.http.delete(path, options)

Sends a low-level DELETE request.

Caution

Raw HTTP methods are not intended for production use. They are not typed, do not have any guardrails, and are provided for advanced use cases and testing. Where possible, use the domain services instead.

Input

string
required
Relative API path or absolute URL.
object
optional
Object parameter. Expand to see child parameters.
Show child parameters
QueryParams
optional
Query parameters appended to the URL.
ResponseType
optional
Parser override.

Headers

object
optional
Object parameter. Expand to see child parameters.
Show child parameters
HeadersInit
optional
Additional HTTP headers.

Returns

Promise<TResponse>
optional
Parsed response body or undefined for 204 responses.
optional
Typed SDK error when the request fails.
Show child fields
string
required
Safe error message.
string
required
SDK error class name.
unknown
optional
Original cause when available.
string
optional
HTTP method when the error came from a request.
string
optional
API path when the error came from a request.
string
optional
Request identifier from X-Request-Id when supplied.

http.buildUrl()

Build an API URL

linxio.http.buildUrl(path, params)

Builds the final request URL, including query parameters. This is useful in tests and debugging output.

Input

string
required
Relative API path or absolute URL.
QueryParams
optional
Query parameters to append.

Returns

URL
optional
Final URL object.

Request options

LinxioHttpRequestOptions

unknown
optional
Request body for mutation methods. Plain objects are JSON encoded.
HeadersInit
optional
Additional request headers.
string
optional
Optional caller-managed idempotency key for retry safety.
QueryParams
optional
Query parameters appended to the URL.
json | text | blob | arrayBuffer | raw
optional
Response parser override.
Default: json
AbortSignal
optional
Abort signal for caller-managed cancellation.
boolean
optional
Skip the bearer token for this request.
boolean
optional
Skip automatic refresh handling for this request.
number
optional
Override the client timeout for this request.

Retry policy

RetryOptions

number
optional
Number of retries after the first attempt.
Default: 3
number
optional
Initial exponential backoff delay in milliseconds.
Default: 1000
number
optional
Maximum exponential backoff delay in milliseconds.
Default: 8000
boolean
optional
Retry POST, PATCH, PUT, and DELETE requests. Keep false unless the operation is idempotent or protected by your own idempotency key.
Default: false

On this page