List of usage examples for org.springframework.http HttpStatus toString
@Override
public String toString()
From source file:org.springframework.cloud.gateway.route.builder.GatewayFilterSpec.java
/** * A filter that sets the status on the response before it is returned to the client * by the Gateway./*from www . j a va2 s. c o m*/ * @param status the status to set on the response * @return a {@link GatewayFilterSpec} that can be used to apply additional filters */ public GatewayFilterSpec setStatus(HttpStatus status) { return setStatus(status.toString()); }
From source file:org.springframework.http.server.reactive.AbstractServerHttpResponse.java
@Override public boolean setStatusCode(@Nullable HttpStatus statusCode) { if (this.state.get() == State.COMMITTED) { if (logger.isTraceEnabled()) { logger.trace("HTTP response already committed. " + "Status not set to " + (statusCode != null ? statusCode.toString() : "null")); }/*from w ww . j av a2 s. co m*/ return false; } else { this.statusCode = (statusCode != null ? statusCode.value() : null); return true; } }