1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-21 17:29:17 +08:00
1Panel/frontend/src/enums/http-enum.ts
2023-03-14 15:44:36 +08:00

38 lines
773 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export enum ResultEnum {
SUCCESS = 200,
ERROR = 500,
OVERDUE = 401,
UNSAFETY = 402,
FORBIDDEN = 403,
EXPIRED = 405,
ERRAUTH = 406,
ERRGLOBALLOADDING = 407,
TIMEOUT = 10000,
TYPE = 'success',
}
/**
* @description请求方法
*/
export enum RequestEnum {
GET = 'GET',
POST = 'POST',
PATCH = 'PATCH',
PUT = 'PUT',
DELETE = 'DELETE',
}
/**
* @description常用的contentTyp类型
*/
export enum ContentTypeEnum {
// json
JSON = 'application/json;charset=UTF-8',
// text
TEXT = 'text/plain;charset=UTF-8',
// form-data 一般配合qs
FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8',
// form-data 上传
FORM_DATA = 'multipart/form-data;charset=UTF-8',
}