@push.rocks/smartrequest
Version:
A module for modern HTTP/HTTPS requests with support for form data, file uploads, JSON, binary data, streams, and more.
35 lines (34 loc) • 1.17 kB
TypeScript
import * as types from './types.js';
import { CoreResponse } from './response.js';
import { CoreRequest as AbstractCoreRequest } from '../core_base/request.js';
/**
* Fetch-based implementation of Core Request class
*/
export declare class CoreRequest extends AbstractCoreRequest<types.ICoreRequestOptions, CoreResponse> {
constructor(url: string, options?: types.ICoreRequestOptions);
/**
* Build the full URL with query parameters
*/
private buildUrl;
/**
* Convert our options to fetch RequestInit
*/
private buildFetchOptions;
/**
* Fire the request and return a CoreResponse
*/
fire(): Promise<CoreResponse>;
/**
* Fire the request and return the raw Response
*/
fireCore(): Promise<Response>;
/**
* Static factory method to create and fire a request
*/
static create(url: string, options?: types.ICoreRequestOptions): Promise<CoreResponse>;
}
/**
* Convenience exports for backward compatibility
*/
export declare const isUnixSocket: typeof AbstractCoreRequest.isUnixSocket;
export declare const parseUnixSocketUrl: typeof AbstractCoreRequest.parseUnixSocketUrl;