本文整理匯總了Java中org.springframework.web.bind.annotation.RequestMethod.OPTIONS屬性的典型用法代碼示例。如果您正苦於以下問題:Java RequestMethod.OPTIONS屬性的具體用法?Java RequestMethod.OPTIONS怎麽用?Java RequestMethod.OPTIONS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.springframework.web.bind.annotation.RequestMethod
的用法示例。
在下文中一共展示了RequestMethod.OPTIONS屬性的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleResultsYML
@RequestMapping(value = "/**", method = RequestMethod.OPTIONS, produces = "application/x-yaml")
public Object handleResultsYML(HttpServletRequest request) {
CollectionResources resource = handleResultsJson(request, Optional.empty());
return new RamlBuilder(resource).build();
}
示例2: doOptions
/**
* Options for endpoint
* @param response
* @return the options
*/
@RequestMapping(method= RequestMethod.OPTIONS)
public @ResponseBody
EndpointOptions doOptions(HttpServletResponse response) {
response.setHeader("Allow", options.getAllowedMethods());
return options;
}
示例3: doOptions
/**
* Options for endpoint
* @param response
* @return
*/
@RequestMapping(method= RequestMethod.OPTIONS)
public @ResponseBody EndpointOptions doOptions(HttpServletResponse response) {
response.setHeader("Allow", options.getAllowedMethods());
return options;
}
示例4: requestMappingUnprotectedAndProtectedUncommonMethods
/**
* Mapping to several HTTP request methods is not OK if it's a mix of unprotected and protected HTTP request methods.
*/
@RequestMapping(value = "/request-mapping-unprotected-and-protected-uncommon-methods", method = {RequestMethod.OPTIONS, RequestMethod.PATCH})
public void requestMappingUnprotectedAndProtectedUncommonMethods() {
}
開發者ID:blackarbiter,項目名稱:Android_Code_Arbiter,代碼行數:6,代碼來源:UnsafeSpringCsrfRequestMappingController.java
示例5: requestMappingAllUnprotectedMethodsAndOneProtectedMethod
/**
* Mapping to several HTTP request methods is not OK if it's a mix of unprotected and protected HTTP request methods.
*/
@RequestMapping(value = "/request-mapping-all-unprotected-methods-and-one-protected-method",
method = {RequestMethod.GET, RequestMethod.HEAD, RequestMethod.TRACE, RequestMethod.OPTIONS, RequestMethod.PATCH})
public void requestMappingAllUnprotectedMethodsAndOneProtectedMethod() {
}
開發者ID:blackarbiter,項目名稱:Android_Code_Arbiter,代碼行數:7,代碼來源:UnsafeSpringCsrfRequestMappingController.java
示例6: requestMappingAllProtectedMethodsAndOneUnprotectedMethod
/**
* Mapping to several HTTP request methods is not OK if it's a mix of unprotected and protected HTTP request methods.
*/
@RequestMapping(value = "/request-mapping-all-protected-methods-and-one-unprotected-method",
method = {RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE, RequestMethod.PATCH, RequestMethod.OPTIONS})
public void requestMappingAllProtectedMethodsAndOneUnprotectedMethod() {
}
開發者ID:blackarbiter,項目名稱:Android_Code_Arbiter,代碼行數:7,代碼來源:UnsafeSpringCsrfRequestMappingController.java
示例7: requestMappingOptions
/**
* Mapping to the HTTP request method `OPTIONS` is safe as long as no state-changing operations are performed within this method.
*/
@RequestMapping(value = "/request-mapping-options", method = RequestMethod.OPTIONS)
public void requestMappingOptions() {
}
開發者ID:blackarbiter,項目名稱:Android_Code_Arbiter,代碼行數:6,代碼來源:SafeSpringCsrfRequestMappingController.java
示例8: requestMappingSeveralUnprotectedMethods
/**
* Mapping to several HTTP request methods is fine as long as all the HTTP request methods used are unprotected.
*/
@RequestMapping(value = "/request-mapping-several-unprotected-methods",
method = {RequestMethod.GET, RequestMethod.HEAD, RequestMethod.TRACE, RequestMethod.OPTIONS})
public void requestMappingSeveralUnprotectedMethods() {
}
開發者ID:blackarbiter,項目名稱:Android_Code_Arbiter,代碼行數:7,代碼來源:SafeSpringCsrfRequestMappingController.java