接口的使用
cn.taketoday.http.HttpStatusCode
使用HttpStatusCode的程序包
程序包
说明
Contains a basic abstraction over client/server-side HTTP.
Contains an abstraction over client-side HTTP.
Abstractions for reactive HTTP client support including
ClientHttpRequest and
ClientHttpResponse as well as a
ClientHttpConnector.Contains an abstraction over server-side HTTP.
Abstractions for reactive HTTP server support including a
ServerHttpRequest and
ServerHttpResponse along with an
HttpHandler for processing.Core package of the client-side web support.
Web Handler
Provides the types that make up Infra functional web framework.
Method handler
Standard controller implementations for the MVC framework use like Framework
Provides a reactive
WebClient
that builds on top of the
cn.taketoday.http.client.reactive reactive HTTP adapter layer.Classes supporting the
cn.taketoday.web.reactive.function.client package.Provides standard View and ViewResolver implementations,
including abstract base classes for custom implementations.
-
cn.taketoday.http中HttpStatusCode的使用
修饰符和类型类说明enumEnumeration of HTTP status codes.(专用程序包) final classSimple implementation ofHttpStatusCode.修饰符和类型方法说明HttpStatusCodeProvider.getStatusCode()Return the HTTP status code to use for the response.ResponseEntity.getStatusCode()Return the HTTP status code of the response.static HttpStatusCodeHttpStatusCode.valueOf(int code) Return anHttpStatusCodeobject for the given integer value.参数类型为HttpStatusCode的cn.taketoday.http中的方法修饰符和类型方法说明intSimpleHttpStatusCode.compareTo(HttpStatusCode o) static ProblemDetailProblemDetail.forStatus(HttpStatusCode status) Create aProblemDetailinstance with the given status code.static ProblemDetailProblemDetail.forStatusAndDetail(HttpStatusCode status, String detail) Create aProblemDetailinstance with the given status and detail.default booleanHttpStatusCode.isSameCodeAs(HttpStatusCode other) Whether thisHttpStatusCodeshares the same integervalueas the other status code.static ResponseEntity.BodyBuilderResponseEntity.status(HttpStatusCode status) Create a builder with the given status.ProblemDetail.withStatus(HttpStatusCode status) Variant ofProblemDetail.setStatus(int)for chained initialization.参数类型为HttpStatusCode的cn.taketoday.http中的构造器限定符构造器说明ResponseEntity(HttpStatusCode status) Create a newResponseEntitywith the given status code, and no body nor headers.ResponseEntity(cn.taketoday.util.MultiValueMap<String, String> headers, HttpStatusCode status) Create a newHttpEntitywith the given headers and status code, and no body.ResponseEntity(T body, HttpStatusCode status) Create a newResponseEntitywith the given body and status code, and no headers.ResponseEntity(T body, cn.taketoday.util.MultiValueMap<String, String> headers, HttpStatusCode status) Create a newHttpEntitywith the given body, headers, and status code. -
cn.taketoday.http.client中HttpStatusCode的使用
修饰符和类型方法说明ClientHttpResponse.getStatusCode()Get the HTTP status code as anHttpStatusCode.ClientHttpResponseDecorator.getStatusCode()HttpComponentsClientHttpResponse.getStatusCode()JdkClientHttpResponse.getStatusCode()JettyClientHttpResponse.getStatusCode()ReactorNettyClientResponse.getStatusCode()SimpleClientHttpResponse.getStatusCode() -
cn.taketoday.http.client.reactive中HttpStatusCode的使用
修饰符和类型方法说明default HttpStatusCodeClientHttpResponse.getStatusCode()Return the HTTP status code as anHttpStatusenum value.ClientHttpResponseDecorator.getStatusCode()JdkClientHttpResponse.getStatusCode()ReactorNetty2ClientHttpResponse.getStatusCode() -
cn.taketoday.http.server中HttpStatusCode的使用
参数类型为HttpStatusCode的cn.taketoday.http.server中的方法修饰符和类型方法说明voidDelegatingServerHttpResponse.setStatusCode(HttpStatusCode status) voidServerHttpResponse.setStatusCode(HttpStatusCode status) Set the HTTP status code of the response.voidServletServerHttpResponse.setStatusCode(HttpStatusCode status) -
cn.taketoday.http.server.reactive中HttpStatusCode的使用
修饰符和类型方法说明AbstractServerHttpResponse.getStatusCode()ReactorNetty2ServerHttpResponse.getStatusCode()ReactorServerHttpResponse.getStatusCode()ServerHttpResponse.getStatusCode()Return the status code that has been set, or otherwise fall back on the status of the response from the underlying server.ServerHttpResponseDecorator.getStatusCode()ServletServerHttpResponse.getStatusCode()UndertowServerHttpResponse.getStatusCode() -
cn.taketoday.web中HttpStatusCode的使用
声明为HttpStatusCode的cn.taketoday.web中的字段修饰符和类型方法说明ErrorResponse.getStatusCode()Return the HTTP status code to use for the response.ErrorResponseException.getStatusCode()InfraConfigurationException.getStatusCode()参数类型为HttpStatusCode的cn.taketoday.web中的方法修饰符和类型方法说明voidDecoratingRequestContext.sendError(HttpStatusCode code) voidDecoratingRequestContext.sendError(HttpStatusCode code, String msg) voidRequestContext.sendError(HttpStatusCode code) Sends an error response to the client using the specified status code and clears the buffer.voidRequestContext.sendError(HttpStatusCode code, String msg) Sends an error response to the client using the specified status and clears the buffer.voidDecoratingRequestContext.setStatus(HttpStatusCode status) voidRequestContext.setStatus(HttpStatusCode status) Sets the status code and message for this response.voidRequestContext.RequestContextHttpOutputMessage.setStatusCode(HttpStatusCode status) 参数类型为HttpStatusCode的cn.taketoday.web中的构造器限定符构造器说明ErrorResponseException(HttpStatusCode status) Constructor with aHttpStatusCode.ErrorResponseException(HttpStatusCode status, ProblemDetail body, Throwable cause) Constructor with a givenProblemDetailinstance, possibly a subclass ofProblemDetailwith extended fields.ErrorResponseException(HttpStatusCode status, Throwable cause) Constructor with aHttpStatusCodeand an optional cause.Constructor with a response status.ResponseStatusException(HttpStatusCode status, String reason) Constructor with a response status and a reason to add to the exception message as explanation.ResponseStatusException(HttpStatusCode status, String reason, Throwable cause) Constructor with a response status and a reason to add to the exception message as explanation, as well as a nested exception. -
cn.taketoday.web.bind中HttpStatusCode的使用
修饰符和类型方法说明MethodArgumentNotValidException.getStatusCode()RequestBindingException.getStatusCode() -
cn.taketoday.web.client中HttpStatusCode的使用
修饰符和类型字段说明private final HttpStatusCodeRestClientResponseException.statusCodeprivate final HttpStatusCodeUnknownContentTypeException.statusCode类型参数类型为HttpStatusCode的cn.taketoday.web.client中的字段修饰符和类型字段说明private final Map<HttpStatusCode,Class<? extends RestClientException>> ExtractingResponseErrorHandler.statusMapping修饰符和类型方法说明RestClientResponseException.getStatusCode()Return the HTTP status code.UnknownContentTypeException.getStatusCode()Return the HTTP status code value.参数类型为HttpStatusCode的cn.taketoday.web.client中的方法修饰符和类型方法说明static HttpClientErrorExceptionHttpClientErrorException.create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) CreateHttpClientErrorExceptionor an HTTP status specific sub-class.static HttpClientErrorExceptionHttpClientErrorException.create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Variant ofHttpClientErrorException.create(HttpStatusCode, String, HttpHeaders, byte[], Charset)with an optional prepared message.static HttpServerErrorExceptionHttpServerErrorException.create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Variant ofHttpServerErrorException.create(String, HttpStatusCode, String, HttpHeaders, byte[], Charset)with an optional prepared message.private static StringHttpStatusCodeException.getMessage(HttpStatusCode statusCode, String statusText) protected voidDefaultResponseErrorHandler.handleError(ClientHttpResponse response, HttpStatusCode statusCode) Handle the error based on the resolved status code.voidExtractingResponseErrorHandler.handleError(ClientHttpResponse response, HttpStatusCode statusCode) protected booleanDefaultResponseErrorHandler.hasError(HttpStatusCode statusCode) Template method called fromDefaultResponseErrorHandler.hasError(ClientHttpResponse).protected booleanExtractingResponseErrorHandler.hasError(HttpStatusCode statusCode) private static StringHttpStatusCodeException.name(HttpStatusCode statusCode) 类型变量类型为HttpStatusCode的cn.taketoday.web.client中的方法参数修饰符和类型方法说明DefaultRestClientBuilder.defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler) RestClient.Builder.defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler) Register a default status handler to apply to every response.static StatusHandlerStatusHandler.of(Predicate<HttpStatusCode> predicate, RestClient.ResponseSpec.ErrorHandler errorHandler) DefaultRestClient.DefaultResponseSpec.onStatus(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler) RestClient.ResponseSpec.onStatus(Predicate<HttpStatusCode> statusPredicate, RestClient.ResponseSpec.ErrorHandler errorHandler) Provide a function to map specific error status codes to an error handler.voidExtractingResponseErrorHandler.setStatusMapping(Map<HttpStatusCode, Class<? extends RestClientException>> statusMapping) Set the mapping from HTTP status code toRestClientExceptionsubclass.参数类型为HttpStatusCode的cn.taketoday.web.client中的构造器限定符构造器说明HttpClientErrorException(HttpStatusCode statusCode) Constructor with a status code only.HttpClientErrorException(HttpStatusCode statusCode, String statusText) Constructor with a status code and status text.HttpClientErrorException(HttpStatusCode statusCode, String statusText, byte[] body, Charset responseCharset) Constructor with a status code and status text, and content.HttpClientErrorException(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset) Constructor with a status code and status text, headers, and content.HttpClientErrorException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset responseCharset) Constructor with a status code and status text, headers, and content, and an prepared message.HttpServerErrorException(HttpStatusCode statusCode) Constructor with a status code only.HttpServerErrorException(HttpStatusCode statusCode, String statusText) Constructor with a status code and status text.HttpServerErrorException(HttpStatusCode statusCode, String statusText, byte[] body, Charset charset) Constructor with a status code and status text, and content.HttpServerErrorException(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Constructor with a status code and status text, headers, and content.HttpServerErrorException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset) Constructor with a status code and status text, headers, content, and an prepared message.protectedHttpStatusCodeException(HttpStatusCode statusCode) Construct a new instance with anHttpStatusCode.protectedHttpStatusCodeException(HttpStatusCode statusCode, String statusText) Construct a new instance with anHttpStatusCodeand status text.protectedHttpStatusCodeException(HttpStatusCode statusCode, String statusText, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode, status text, and content.protectedHttpStatusCodeException(HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode, status text, content, and a response charset.protectedHttpStatusCodeException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) Construct instance with anHttpStatusCode, status text, content, and a response charset.RestClientResponseException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset responseCharset) Construct a new instance of with the given response data.UnknownContentTypeException(Type targetType, MediaType contentType, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data. -
cn.taketoday.web.config中HttpStatusCode的使用
参数类型为HttpStatusCode的cn.taketoday.web.config中的方法修饰符和类型方法说明voidViewControllerRegistry.addStatusController(String pathPattern, HttpStatusCode statusCode) Map a simple controller to the given URL path (or pattern) in order to set the response status to the given code without rendering a body.RedirectViewControllerRegistration.setStatusCode(HttpStatusCode statusCode) Set the specific redirect 3xx status code to use.ViewControllerRegistration.setStatusCode(HttpStatusCode statusCode) Set the status code to set on the response. -
cn.taketoday.web.handler中HttpStatusCode的使用
参数类型为HttpStatusCode的cn.taketoday.web.handler中的方法修饰符和类型方法说明protected ResponseEntity<Object>ResponseEntityExceptionHandler.createResponseEntity(Object body, HttpHeaders headers, HttpStatusCode statusCode, RequestContext request) Create theResponseEntityto use from the given body, headers, and statusCode.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleAsyncRequestTimeoutException(AsyncRequestTimeoutException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofAsyncRequestTimeoutException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleBindException(cn.taketoday.validation.BindException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofBindException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleConversionNotSupported(cn.taketoday.beans.ConversionNotSupportedException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofConversionNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleErrorResponseException(ErrorResponseException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling of anyErrorResponseException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleExceptionInternal(Exception ex, Object body, HttpHeaders headers, HttpStatusCode statusCode, RequestContext request) Internal handler method that all others in this class delegate to, for common handling, and for the creation of aResponseEntity.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleHandlerNotFoundException(HandlerNotFoundException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofHandlerNotFoundException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleHttpMediaTypeNotAcceptable(HttpMediaTypeNotAcceptableException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofHttpMediaTypeNotAcceptableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofHttpMediaTypeNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofHttpMessageNotReadableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleHttpMessageNotWritable(HttpMessageNotWritableException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofHttpMessageNotWritableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofHttpRequestMethodNotSupportedException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofMethodArgumentNotValidException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleMissingPathVariable(MissingPathVariableException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofMissingPathVariableException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleMissingRequestParameter(MissingRequestParameterException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofMissingRequestParameterException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleMissingRequestPart(MissingRequestPartException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofMissingRequestPartException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleRequestBindingException(RequestBindingException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofRequestBindingException.protected ResponseEntity<Object>ResponseEntityExceptionHandler.handleTypeMismatch(cn.taketoday.beans.TypeMismatchException ex, HttpHeaders headers, HttpStatusCode status, RequestContext request) Customize the handling ofTypeMismatchException. -
cn.taketoday.web.handler.function中HttpStatusCode的使用
修饰符和类型字段说明private HttpStatusCodeDefaultEntityResponseBuilder.statusprivate HttpStatusCodeDefaultRenderingResponseBuilder.statusprivate HttpStatusCodeModelAndViewRenderingResponseBuilder.statusprivate final HttpStatusCodeAbstractServerResponse.statusCodeprivate final HttpStatusCodeDefaultServerResponseBuilder.statusCode修饰符和类型方法说明final HttpStatusCodeAbstractServerResponse.statusCode()DefaultAsyncServerResponse.statusCode()ServerResponse.statusCode()Return the status code of this response.修饰符和类型方法说明DefaultEntityResponseBuilder.status(HttpStatusCode status) DefaultRenderingResponseBuilder.status(HttpStatusCode status) EntityResponse.Builder.status(HttpStatusCode status) Set the HTTP status.ModelAndViewRenderingResponseBuilder.status(HttpStatusCode status) RenderingResponse.Builder.status(HttpStatusCode status) Set the HTTP status.RenderingResponse.ViewBuilder.status(HttpStatusCode status) Set the HTTP status.static ServerResponse.BodyBuilderServerResponse.status(HttpStatusCode status) Create a builder with the given HTTP status.限定符构造器说明protectedAbstractServerResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies) CompletionStageEntityResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, CompletionStage<T> entity, Type entityType) DefaultEntityResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, T entity, Type entityType) DefaultRenderingResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, String name, Map<String, Object> model) ModelAndViewRenderingResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, ModelAndView modelAndView) PublisherEntityResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, org.reactivestreams.Publisher<T> entity, Type entityType) WriteFunctionResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, HttpCookie> cookies, ServerResponse.HeadersBuilder.WriteFunction writeFunction) -
cn.taketoday.web.handler.method中HttpStatusCode的使用
修饰符和类型方法说明protected HttpStatusCodeHandlerMethod.getResponseStatus()Return the specified response status, if any.修饰符和类型方法说明protected voidActionMappingAnnotationHandler.applyResponseStatus(RequestContext context, HttpStatusCode status) -
cn.taketoday.web.handler.mvc中HttpStatusCode的使用
修饰符和类型方法说明ParameterizableViewController.getStatusCode()Return the configured HTTP status code ornull.修饰符和类型方法说明voidParameterizableViewController.setStatusCode(HttpStatusCode statusCode) Configure the HTTP status code that this controller should set on the response. -
cn.taketoday.web.reactive.function.client中HttpStatusCode的使用
修饰符和类型字段说明private final HttpStatusCodeDefaultClientResponseBuilder.BuiltClientHttpResponse.statusCodestatusCode记录组件的字段。private HttpStatusCodeDefaultClientResponseBuilder.statusCodeprivate final HttpStatusCodeWebClientResponseException.statusCode修饰符和类型字段说明private final Predicate<HttpStatusCode>DefaultWebClient.DefaultResponseSpec.StatusHandler.predicatepredicate记录组件的字段。private static final Predicate<HttpStatusCode>DefaultWebClient.DefaultResponseSpec.STATUS_CODE_ERRORprivate Map<Predicate<HttpStatusCode>,Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>>> DefaultWebClientBuilder.statusHandlers修饰符和类型方法说明DefaultClientResponseBuilder.BuiltClientHttpResponse.getStatusCode()WebClientResponseException.getStatusCode()Return the HTTP status code value.ClientResponse.statusCode()Return the HTTP status code as anHttpStatusCodevalue.DefaultClientResponse.statusCode()DefaultClientResponseBuilder.BuiltClientHttpResponse.statusCode()返回statusCode记录组件的值。返回变量类型为HttpStatusCode的类型的cn.taketoday.web.reactive.function.client中的方法修饰符和类型方法说明DefaultWebClient.DefaultResponseSpec.StatusHandler.predicate()返回predicate记录组件的值。private static Predicate<HttpStatusCode>DefaultWebClient.DefaultResponseSpec.toStatusCodePredicate(IntPredicate predicate) 修饰符和类型方法说明static WebClientResponseExceptionWebClientResponseException.create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request) CreateWebClientResponseExceptionor an HTTP status specific subclass.private static StringWebClientResponseException.initMessage(HttpStatusCode status, String reasonPhrase, HttpRequest request) private <T> reactor.core.publisher.Mono<T>DefaultWebClient.DefaultResponseSpec.insertCheckpoint(reactor.core.publisher.Mono<T> result, HttpStatusCode statusCode, HttpRequest request) ClientResponse.Builder.statusCode(HttpStatusCode statusCode) Set the status code of the response.DefaultClientResponseBuilder.statusCode(HttpStatusCode statusCode) booleanDefaultWebClient.DefaultResponseSpec.StatusHandler.test(HttpStatusCode status) 类型变量类型为HttpStatusCode的cn.taketoday.web.reactive.function.client中的方法参数修饰符和类型方法说明DefaultWebClientBuilder.defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) WebClient.Builder.defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) Register a defaultstatus handlerto apply to every response.private static List<DefaultWebClient.DefaultResponseSpec.StatusHandler>DefaultWebClient.initStatusHandlers(Map<Predicate<HttpStatusCode>, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>>> handlerMap) DefaultWebClient.DefaultResponseSpec.onStatus(Predicate<HttpStatusCode> statusCodePredicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) WebClient.ResponseSpec.onStatus(Predicate<HttpStatusCode> statusPredicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) Provide a function to map specific error status codes to an error signal to be propagated downstream instead of the response.static ExchangeFilterFunctionExchangeFilterFunctions.statusError(Predicate<HttpStatusCode> statusPredicate, Function<ClientResponse, ? extends Throwable> exceptionFunction) Return a filter that generates an error signal when the givenHttpStatuspredicate matches.限定符构造器说明privateBuiltClientHttpResponse(HttpStatusCode statusCode, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, ResponseCookie> cookies, reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> body, ClientResponse originalResponse) 创建BuiltClientHttpResponse记录的实例。UnknownHttpStatusCodeException(HttpStatusCode statusCode, HttpHeaders headers, byte[] responseBody, Charset responseCharset, HttpRequest request) Create a new instance of theUnknownHttpStatusCodeExceptionwith the given parameters.WebClientResponseException(HttpStatusCode statusCode, String reasonPhrase, HttpHeaders headers, byte[] body, Charset charset, HttpRequest request) Constructor with response data only, and a default message.WebClientResponseException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] responseBody, Charset charset, HttpRequest request) Constructor with a prepared message.类型变量类型为HttpStatusCode的cn.taketoday.web.reactive.function.client中的构造器参数限定符构造器说明(专用程序包)DefaultWebClient(ExchangeFunction exchangeFunction, UriBuilderFactory uriBuilderFactory, HttpHeaders defaultHeaders, cn.taketoday.util.MultiValueMap<String, String> defaultCookies, Consumer<WebClient.RequestHeadersSpec<?>> defaultRequest, Map<Predicate<HttpStatusCode>, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>>> statusHandlerMap, DefaultWebClientBuilder builder) privateStatusHandler(Predicate<HttpStatusCode> predicate, Function<ClientResponse, reactor.core.publisher.Mono<? extends Throwable>> exceptionFunction) 创建StatusHandler记录的实例。 -
cn.taketoday.web.reactive.function.client.support中HttpStatusCode的使用
-
cn.taketoday.web.servlet.filter中HttpStatusCode的使用
修饰符和类型字段说明private HttpStatusCodeRelativeRedirectFilter.redirectStatusprivate final HttpStatusCodeRelativeRedirectResponseWrapper.redirectStatus修饰符和类型方法说明voidRelativeRedirectFilter.setRedirectStatus(HttpStatusCode status) Set the default HTTP Status to use for redirects.static HttpServletResponseRelativeRedirectResponseWrapper.wrapIfNecessary(HttpServletResponse response, HttpStatusCode redirectStatus) 限定符构造器说明privateRelativeRedirectResponseWrapper(HttpServletResponse response, HttpStatusCode redirectStatus) -
cn.taketoday.web.view中HttpStatusCode的使用
修饰符和类型字段说明private HttpStatusCodeModelAndView.statusOptional HTTP status for the response.private HttpStatusCodeRedirectView.statusCode修饰符和类型方法说明protected HttpStatusCodeRedirectView.getHttpStatus(RequestContext context, String targetUrl) Determines the status code to use for HTTP compatible requests.ModelAndView.getStatus()Return the configured HTTP status for the response, if any.参数类型为HttpStatusCode的cn.taketoday.web.view中的方法修饰符和类型方法说明voidModelAndView.setStatus(HttpStatusCode status) Set the HTTP status to use for the response.voidRedirectView.setStatusCode(HttpStatusCode statusCode) Set the status code for this view.参数类型为HttpStatusCode的cn.taketoday.web.view中的构造器限定符构造器说明ModelAndView(String viewName, HttpStatusCode status) Create a new ModelAndView given a view name and HTTP status.ModelAndView(String viewName, Map<String, ?> model, HttpStatusCode status) Create a new ModelAndView given a view name, model, and HTTP status.