Class MethodNotAllowedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException
- All Implemented Interfaces:
Serializable
Represents an HTTP 405 Method Not Allowed response.
Note that a complete list of RESTful exceptions is available in the Package Summary.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMethodNotAllowedException
(String theMessage) ConstructorMethodNotAllowedException
(String theMessage, RequestTypeEnum... theAllowedMethods) ConstructorMethodNotAllowedException
(String theMessage, IBaseOperationOutcome theOperationOutcome) ConstructorMethodNotAllowedException
(String theMessage, IBaseOperationOutcome theOperationOutcome, RequestTypeEnum... theAllowedMethods) Constructor -
Method Summary
Modifier and TypeMethodDescriptionSpecifies the list of allowed HTTP methods (GET, POST, etc).void
setAllowedMethods
(RequestTypeEnum... theAllowedMethods) Specifies the list of allowed HTTP methods (GET, POST, etc).void
setAllowedMethods
(Set<RequestTypeEnum> theAllowedMethods) Specifies the list of allowed HTTP methods (GET, POST, etc).Methods inherited from class ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
addResponseHeader, getAdditionalMessages, getOperationOutcome, getResponseBody, getResponseHeaders, getResponseMimeType, getStatusCode, hasResponseHeaders, isErrorMessageTrusted, newInstance, setErrorMessageTrusted, setOperationOutcome, setResponseBody, setResponseMimeType
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
STATUS_CODE
- See Also:
-
-
Constructor Details
-
MethodNotAllowedException
public MethodNotAllowedException(String theMessage, IBaseOperationOutcome theOperationOutcome, RequestTypeEnum... theAllowedMethods) Constructor- Parameters:
theMessage
- The messagetheOperationOutcome
- The OperationOutcome resource to return to the clienttheAllowedMethods
- A list of allowed methods (seesetAllowedMethods(RequestTypeEnum...)
)
-
MethodNotAllowedException
Constructor- Parameters:
theMessage
- The messagetheAllowedMethods
- A list of allowed methods (seesetAllowedMethods(RequestTypeEnum...)
)
-
MethodNotAllowedException
Constructor- Parameters:
theMessage
- The messagetheOperationOutcome
- The OperationOutcome resource to return to the client
-
MethodNotAllowedException
Constructor- Parameters:
theMessage
- The message
-
-
Method Details
-
getAllowedMethods
Specifies the list of allowed HTTP methods (GET, POST, etc). This is provided in anAllow
header, as required by the HTTP specification (RFC 2616). -
setAllowedMethods
Specifies the list of allowed HTTP methods (GET, POST, etc). This is provided in anAllow
header, as required by the HTTP specification (RFC 2616). -
setAllowedMethods
Specifies the list of allowed HTTP methods (GET, POST, etc). This is provided in anAllow
header, as required by the HTTP specification (RFC 2616).
-