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.

Input

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

Returns

data
Promise<TResponse>
optional
Parsed response. Raw request methods throw typed SDK errors instead of returning LinxioResult.
throws
LinxioApiError | LinxioNetworkError | LinxioTimeoutError
optional
Typed SDK error when the request fails.

http.get()

Send a GET request

linxio.http.get(path, options)

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

Input

path
string
required
Relative API path or absolute URL.
options.params
QueryParams
optional
Query parameters appended to the URL.
options.responseType
ResponseType
optional
Parser override.

Returns

data
Promise<TResponse>
optional
Parsed response body.
throws
LinxioError
optional
Typed SDK error when the request fails.

http.post()

Send a POST request

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

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

Input

path
string
required
Relative API path or absolute URL.
body
unknown
optional
Request body.
options.idempotencyKey
string
optional
Optional caller-managed idempotency key for retry-safe operations.

Returns

data
Promise<TResponse>
optional
Parsed response body.
throws
LinxioError
optional
Typed SDK error when the request fails.

http.patch()

Send a PATCH request

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

Sends a low-level PATCH request.

Input

path
string
required
Relative API path or absolute URL.
body
unknown
optional
Request body.
options
LinxioHttpRequestOptions
optional
Headers, params, timeout, signal, and response parser options.

Returns

data
Promise<TResponse>
optional
Parsed response body.
throws
LinxioError
optional
Typed SDK error when the request fails.

http.put()

Send a PUT request

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

Sends a low-level PUT request.

Input

path
string
required
Relative API path or absolute URL.
body
unknown
optional
Request body.
options
LinxioHttpRequestOptions
optional
Headers, params, timeout, signal, and response parser options.

Returns

data
Promise<TResponse>
optional
Parsed response body.
throws
LinxioError
optional
Typed SDK error when the request fails.

http.delete()

Send a DELETE request

linxio.http.delete(path, options)

Sends a low-level DELETE request.

Input

path
string
required
Relative API path or absolute URL.
options
LinxioHttpRequestOptions
optional
Headers, params, timeout, signal, and response parser options.

Returns

data
Promise<TResponse>
optional
Parsed response body or undefined for 204 responses.
throws
LinxioError
optional
Typed SDK error when the request fails.

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

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

Returns

data
URL
optional
Final URL object.

Request options

LinxioHttpRequestOptions

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

Retry policy

RetryOptions

retries
number
optional
Number of retries after the first attempt.
Default: 3
delayMs
number
optional
Initial exponential backoff delay in milliseconds.
Default: 1000
maxDelayMs
number
optional
Maximum exponential backoff delay in milliseconds.
Default: 8000
retryUnsafeMethods
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