{title:'HTTP Responses', created:'9.0.0'}

The {@link oaj.http.response} package contains predefined org.apache.http.HttpResponse implementations for most standard HTTP responses.

- {@link oaj.http.response.Accepted}
- {@link oaj.http.response.AlreadyReported}
- {@link oaj.http.response.BadRequest}
- {@link oaj.http.response.Conflict}
- {@link oaj.http.response.Continue}
- {@link oaj.http.response.Created}
- {@link oaj.http.response.EarlyHints}
- {@link oaj.http.response.ExpectationFailed}
- {@link oaj.http.response.FailedDependency}
- {@link oaj.http.response.Forbidden}
- {@link oaj.http.response.Found}
- {@link oaj.http.response.Gone}
- {@link oaj.http.response.HttpVersionNotSupported}
- {@link oaj.http.response.IMUsed}
- {@link oaj.http.response.InsufficientStorage}
- {@link oaj.http.response.InternalServerError}
- {@link oaj.http.response.LengthRequired}
- {@link oaj.http.response.Locked}
- {@link oaj.http.response.LoopDetected}
- {@link oaj.http.response.MethodNotAllowed}
- {@link oaj.http.response.MisdirectedRequest}
- {@link oaj.http.response.MovedPermanently}
- {@link oaj.http.response.MultipleChoices}
- {@link oaj.http.response.MultiStatus}
- {@link oaj.http.response.NetworkAuthenticationRequired}
- {@link oaj.http.response.NoContent}
- {@link oaj.http.response.NonAuthoritiveInformation}
- {@link oaj.http.response.NotAcceptable}
- {@link oaj.http.response.NotExtended}
- {@link oaj.http.response.NotFound}
- {@link oaj.http.response.NotImplemented}
- {@link oaj.http.response.NotModified}
- {@link oaj.http.response.Ok}
- {@link oaj.http.response.PartialContent}
- {@link oaj.http.response.PayloadTooLarge}
- {@link oaj.http.response.PermanentRedirect}
- {@link oaj.http.response.PreconditionFailed}
- {@link oaj.http.response.PreconditionRequired}
- {@link oaj.http.response.Processing}
- {@link oaj.http.response.RangeNotSatisfiable}
- {@link oaj.http.response.RequestHeaderFieldsTooLarge}
- {@link oaj.http.response.ResetContent}
- {@link oaj.http.response.SeeOther}
- {@link oaj.http.response.ServiceUnavailable}
- {@link oaj.http.response.SwitchingProtocols}
- {@link oaj.http.response.TemporaryRedirect}
- {@link oaj.http.response.TooManyRequests}
- {@link oaj.http.response.Unauthorized}
- {@link oaj.http.response.UnavailableForLegalReasons}
- {@link oaj.http.response.UnprocessableEntity}
- {@link oaj.http.response.UnsupportedMediaType}
- {@link oaj.http.response.UpgradeRequired}
- {@link oaj.http.response.UriTooLong}
- {@link oaj.http.response.UseProxy}
- {@link oaj.http.response.VariantAlsoNegotiates}

These are built upon existing HttpComponents APIs:

- {@code org.apache.http.HttpMessage}
  - {@code org.apache.http.HttpResponse}
    - {@link oaj.http.response.BasicHttpResponse} - 100-399 response codes
    - {@link oaj.http.response.BasicHttpException} - 400+ response codes

The most common location where these responses are used are in REST operation methods described later.

##### Example:

| @RestDelete(path="/{id}") | public Ok doDelete(@Path int id) throws NotFound, Unauthorized { | pojoService.delete(pojoService.find(id).orElseThrow(NotFound::new)); | return Ok.OK; | }

The following classes are also provided for constructing your own custom responses:

- {@link oaj.http.response.BasicHttpException}
- {@link oaj.http.response.BasicHttpResponse}