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.
Input methodGET | POST | PATCH | PUT | DELETE | HEAD | OPTIONS
required API path relative to the configured base URL, or an absolute URL.
options.paramsQueryParams
optional Query parameters appended to the URL.
options.bodyunknown
optional JSON body, FormData, URLSearchParams, string, ArrayBuffer, or Blob.
options.responseTypejson | text | blob | arrayBuffer | raw
optional Response parser override.
Default: json
Returns dataPromise<TResponse>
optional Parsed response. Raw request methods throw typed SDK errors instead of returning LinxioResult.
throwsLinxioApiError | LinxioNetworkError | LinxioTimeoutError
optional Typed SDK error when the request fails.
const countries = await linxio. request ( "GET" , "/country/list" );
console. log (countries); const vehicle = await linxio. request ( "POST" , "/vehicles" , {
body: {
regNo: "TEST-001" ,
defaultLabel: "Temporary SDK Test Vehicle" ,
},
});
Input Relative API path or absolute URL.
options.paramsQueryParams
optional Query parameters appended to the URL.
options.responseTypeResponseType
optional Returns dataPromise<TResponse>
optional throwsLinxioError
optional Typed SDK error when the request fails.
const me = await linxio.http. get ( "/me" , {
params: { "fields[]" : [ "id" , "email" ] },
});
Send a POST request linxio.http.post(path, body, options)
Sends a low-level POST request. JSON-compatible objects are encoded
automatically.
Input Relative API path or absolute URL.
options.idempotencyKeystring
optional Optional caller-managed idempotency key for retry-safe operations.
Returns dataPromise<TResponse>
optional throwsLinxioError
optional Typed SDK error when the request fails.
const created = await linxio.http. post ( "/vehicles" , {
regNo: "TEST-001" ,
});
Input Relative API path or absolute URL.
optionsLinxioHttpRequestOptions
optional Headers, params, timeout, signal, and response parser options.
Returns dataPromise<TResponse>
optional throwsLinxioError
optional Typed SDK error when the request fails.
await linxio.http. patch ( `/devices/${ deviceId }` , {
serial: "UPDATED-SERIAL" ,
});
Input Relative API path or absolute URL.
optionsLinxioHttpRequestOptions
optional Headers, params, timeout, signal, and response parser options.
Returns dataPromise<TResponse>
optional throwsLinxioError
optional Typed SDK error when the request fails.
const updated = await linxio.http. put ( "/custom-endpoint" , payload);
Input Relative API path or absolute URL.
optionsLinxioHttpRequestOptions
optional Headers, params, timeout, signal, and response parser options.
Returns dataPromise<TResponse>
optional Parsed response body or undefined for 204 responses.
throwsLinxioError
optional Typed SDK error when the request fails.
await linxio.http. delete ( `/areas/${ areaId }` );
Input Relative API path or absolute URL.
paramsQueryParams
optional Query parameters to append.
const url = linxio.http. buildUrl ( "/vehicles/fields/json" , {
"fields[]" : [ "id" , "regNo" ],
limit: 100 ,
});
console. log (url. toString ());
LinxioHttpRequestOptions Request body for mutation methods. Plain objects are JSON encoded.
headersHeadersInit
optional Additional request headers.
idempotencyKeystring
optional Optional caller-managed idempotency key for retry safety.
paramsQueryParams
optional Query parameters appended to the URL.
responseTypejson | text | blob | arrayBuffer | raw
optional Response parser override.
Default: json
signalAbortSignal
optional Abort signal for caller-managed cancellation.
Skip the bearer token for this request.
skipAuthRefreshboolean
optional Skip automatic refresh handling for this request.
Override the client timeout for this request.
RetryOptions Number of retries after the first attempt.
Default: 3
Initial exponential backoff delay in milliseconds.
Default: 1000
Maximum exponential backoff delay in milliseconds.
Default: 8000
retryUnsafeMethodsboolean
optional Retry POST, PATCH, PUT, and DELETE requests. Keep false unless the operation is idempotent or protected by your own idempotency key.
Default: false