import { AxiosResponse } from 'axios'; import { REQUEST_METHODS } from './ApiTypes'; import PathArrayable from './Path'; /** * Represents a network handler for making HTTP requests to the iGEM API. */ export default class NetworkHandler { /** * The base URL for the iGEM API. */ static apiUrl: string; /** * Sends a network request to the specified path using the specified method. * @param pathArrayable - The path to send the request to. * @param method - The HTTP method to use for the request. * @param args - Optional arguments for the request. * @returns A Promise that resolves to the AxiosResponse object representing the response. */ static sendRequest(pathArrayable: PathArrayable, method: REQUEST_METHODS, args?: { parameters?: Object; body?: Object; sessionToken?: string; }): Promise; /** * Asserts the status code of an Axios response. * @param response - The Axios response object. * @param expectedStatusCode - The expected status code. * @param errorMessage - The error message to throw if the status code does not match the expected value. * @returns The original Axios response object. * @throws Error if the status code does not match the expected value. */ static assertStatusCode(response: AxiosResponse, expectedStatusCode: number, errorMessage: string): AxiosResponse; } //# sourceMappingURL=NetworkHandler.d.ts.map