Class ResponseHighlighterInterceptor
java.lang.Object
ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor
This interceptor detects when a request is coming from a browser, and automatically returns a response with syntax
highlighted (coloured) HTML for the response instead of just returning raw XML/JSON.
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcapabilityStatementGenerated(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseConformance theCapabilityStatement)booleanhandleException(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException, javax.servlet.http.HttpServletRequest theServletRequest, javax.servlet.http.HttpServletResponse theServletResponse)booleanIf set totrue(default isfalse) response will include the request headersbooleanIf set totrue(default istrue) response will include the response headersbooleanoutgoingGraphqlResponse(RequestDetails theRequestDetails, String theRequest, String theResponse, javax.servlet.http.HttpServletRequest theServletRequest, javax.servlet.http.HttpServletResponse theServletResponse)booleanoutgoingResponse(RequestDetails theRequestDetails, ResponseDetails theResponseObject, javax.servlet.http.HttpServletRequest theServletRequest, javax.servlet.http.HttpServletResponse theServletResponse)setShowRequestHeaders(boolean theShowRequestHeaders)If set totrue(default isfalse) response will include the request headerssetShowResponseHeaders(boolean theShowResponseHeaders)If set totrue(default istrue) response will include the response headers
-
Field Details
-
PARAM_RAW
TODO: As of HAPI 1.6 (2016-06-10) this parameter has been replaced with simply requesting _format=json or xml so eventually this parameter should be removed- See Also:
- Constant Field Values
-
PARAM_RAW_TRUE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ResponseHighlighterInterceptor
public ResponseHighlighterInterceptor()Constructor
-
-
Method Details
-
handleException
public boolean handleException(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException, javax.servlet.http.HttpServletRequest theServletRequest, javax.servlet.http.HttpServletResponse theServletResponse) -
isShowRequestHeaders
If set totrue(default isfalse) response will include the request headers -
setShowRequestHeaders
If set totrue(default isfalse) response will include the request headers- Returns:
- Returns a reference to this for easy method chaining
-
isShowResponseHeaders
If set totrue(default istrue) response will include the response headers -
setShowResponseHeaders
If set totrue(default istrue) response will include the response headers- Returns:
- Returns a reference to this for easy method chaining
-
outgoingGraphqlResponse
public boolean outgoingGraphqlResponse(RequestDetails theRequestDetails, String theRequest, String theResponse, javax.servlet.http.HttpServletRequest theServletRequest, javax.servlet.http.HttpServletResponse theServletResponse) throws ca.uhn.fhir.rest.server.exceptions.AuthenticationException- Throws:
ca.uhn.fhir.rest.server.exceptions.AuthenticationException
-
outgoingResponse
public boolean outgoingResponse(RequestDetails theRequestDetails, ResponseDetails theResponseObject, javax.servlet.http.HttpServletRequest theServletRequest, javax.servlet.http.HttpServletResponse theServletResponse) throws ca.uhn.fhir.rest.server.exceptions.AuthenticationException- Throws:
ca.uhn.fhir.rest.server.exceptions.AuthenticationException
-
capabilityStatementGenerated
public void capabilityStatementGenerated(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseConformance theCapabilityStatement)
-