- Type Parameters:
- T- the type of the response wrapped by the adapter
public interface CorsResponseAdapter<T>
Not for use by developers.
 Minimal abstraction of an HTTP response.
 
 Note to implementers: In some use cases, the CORS support code will invoke the header methods but not ok
 or forbidden. See to it that header values set on the adapter via the header methods are propagated to the
 actual response.
 
- 
Method SummaryModifier and TypeMethodDescriptionReturns a response with the forbidden status and the specified error message, without any headers assigned using theheadermethods.header(HeaderName key, Object value) Arranges to add the specified header and value to the eventual response.header(HeaderName key, String value) Arranges to add the specified header and value to the eventual response.ok()Returns a response with only the headers that were set on this adapter and the status set to OK.intstatus()Returns the status of the response.
- 
Method Details- 
headerArranges to add the specified header and value to the eventual response.- Parameters:
- key- header name to add
- value- header value to add
- Returns:
- the adapter
 
- 
headerArranges to add the specified header and value to the eventual response.- Parameters:
- key- header name to add
- value- header value to add
- Returns:
- the adapter
 
- 
forbiddenReturns a response with the forbidden status and the specified error message, without any headers assigned using theheadermethods.- Parameters:
- message- error message to use in setting the response status
- Returns:
- the factory
 
- 
okT ok()Returns a response with only the headers that were set on this adapter and the status set to OK.- Returns:
- response instance
 
- 
statusint status()Returns the status of the response.- Returns:
- HTTP status code.
 
 
-