Skip to main content

Overview

Sorionlib includes a powerful API client for making HTTP requests with built-in authentication, retries, and error handling.

Authentication

API key authentication

Bearer token authentication

Custom headers

Available methods

get(endpoint, params)

Makes a GET request. Returns: Promise<object> - The response data.

post(endpoint, data)

Makes a POST request. Returns: Promise<object> - The response data.

put(endpoint, data)

Makes a PUT request. Returns: Promise<object> - The response data.

delete(endpoint)

Makes a DELETE request. Returns: Promise<object> - The response data.

Error handling

The API client throws typed errors that you can catch and handle:

Common error codes

Configuration options