Java Code Examples for org.springframework.web.context.request.WebRequest#getHeader()
The following examples show how to use
org.springframework.web.context.request.WebRequest#getHeader() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppSingUpUtils.java From paascloud-master with Apache License 2.0 | 5 votes |
/** * 获取redis key */ private String getKey(WebRequest request) { String deviceId = request.getHeader("deviceId"); if (StringUtils.isBlank(deviceId)) { throw new AppSecretException("设备id参数不能为空"); } return "pc:security:social.connect." + deviceId; }
Example 2
Source File: WebRequestDataBinder.java From spring-analysis-note with MIT License | 4 votes |
/** * Check if the request is a multipart request (by checking its Content-Type header). * @param request request with parameters to bind */ private boolean isMultipartRequest(WebRequest request) { String contentType = request.getHeader("Content-Type"); return (contentType != null && StringUtils.startsWithIgnoreCase(contentType, "multipart")); }
Example 3
Source File: WebRequestDataBinder.java From java-technology-stack with MIT License | 4 votes |
/** * Check if the request is a multipart request (by checking its Content-Type header). * @param request request with parameters to bind */ private boolean isMultipartRequest(WebRequest request) { String contentType = request.getHeader("Content-Type"); return (contentType != null && StringUtils.startsWithIgnoreCase(contentType, "multipart")); }
Example 4
Source File: WebRequestDataBinder.java From lams with GNU General Public License v2.0 | 4 votes |
/** * Check if the request is a multipart request (by checking its Content-Type header). * @param request request with parameters to bind */ private boolean isMultipartRequest(WebRequest request) { String contentType = request.getHeader("Content-Type"); return (contentType != null && StringUtils.startsWithIgnoreCase(contentType, "multipart")); }
Example 5
Source File: WebRequestDataBinder.java From spring4-understanding with Apache License 2.0 | 4 votes |
/** * Check if the request is a multipart request (by checking its Content-Type header). * @param request request with parameters to bind */ private boolean isMultipartRequest(WebRequest request) { String contentType = request.getHeader("Content-Type"); return (contentType != null && StringUtils.startsWithIgnoreCase(contentType, "multipart")); }
Example 6
Source File: AjaxUtils.java From spring-tutorial with Creative Commons Attribution Share Alike 4.0 International | 4 votes |
public static boolean isAjaxRequest(WebRequest webRequest) { String requestedWith = webRequest.getHeader("X-Requested-With"); return requestedWith != null ? "XMLHttpRequest".equals(requestedWith) : false; }