com.feingto.cloud.constants.HttpConstants Maven / Gradle / Ivy
package com.feingto.cloud.constants;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
/**
* http协议相关常量
*
* @author longfei
*/
public class HttpConstants {
/**
* 任意请求方法
*/
public static final String API_HTTP_METHOD_ANY = "ANY";
/**
* 请求Header Accept
*/
public static final String API_HTTP_HEADER_ACCEPT = HttpHeaders.ACCEPT;
/**
* 请求Body内容MD5 Header
*/
public static final String API_HTTP_HEADER_CONTENT_MD5 = "Content-MD5";
/**
* 请求Header Content-Type
*/
public static final String API_HTTP_HEADER_CONTENT_TYPE = HttpHeaders.CONTENT_TYPE;
/**
* 请求Header UserAgent
*/
public static final String API_HTTP_HEADER_USER_AGENT = HttpHeaders.USER_AGENT;
/**
* 请求Header Date
*/
public static final String API_HTTP_HEADER_DATE = HttpHeaders.DATE;
/**
* 请求Header Host
*/
public static final String API_HTTP_HEADER_HOST = HttpHeaders.HOST;
/**
* 表单类型Content-Type
*/
public static final String API_CONTENT_TYPE_FORM = "application/x-www-form-urlencoded; charset=utf-8";
/**
* 流类型Content-Type
*/
public static final String API_CONTENT_TYPE_STREAM = MediaType.APPLICATION_OCTET_STREAM_VALUE;
/**
* JSON类型Content-Type
*/
public static final String API_CONTENT_TYPE_JSON = MediaType.APPLICATION_JSON_UTF8_VALUE;
/**
* XML类型Content-Type
*/
public static final String API_CONTENT_TYPE_XML = MediaType.APPLICATION_XML_VALUE;
/**
* 文本类型Content-Type
*/
public static final String API_CONTENT_TYPE_TEXT = "application/text; charset=UTF-8";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy