hook-fetch
Version:
A lightweight and modern HTTP request library developed based on the native Fetch API of the browser, providing a user-friendly interface similar to Axios and powerful extensibility.
27 lines (26 loc) • 607 B
TypeScript
export declare enum ContentType {
JSON = "application/json",
FORM_URLENCODED = "application/x-www-form-urlencoded",
FORM_DATA = "multipart/form-data",
TEXT = "text/plain",
HTML = "text/html",
XML = "text/xml",
CSV = "text/csv",
STREAM = "application/octet-stream"
}
export declare enum StatusCode {
TIME_OUT = 408,
ABORTED = 499,
NETWORK_ERROR = 599,
BODY_NULL = 502,
UNKNOWN = 601
}
export declare enum Method {
GET = "GET",
POST = "POST",
PUT = "PUT",
DELETE = "DELETE",
PATCH = "PATCH",
HEAD = "HEAD",
OPTIONS = "OPTIONS"
}