Search in sources :

Example 1 with HttpStatus

use of org.apache.servicecomb.foundation.common.http.HttpStatus in project incubator-servicecomb-java-chassis by apache.

the class StandardHttpServletResponseEx method setStatus.

@SuppressWarnings("deprecation")
@Override
public void setStatus(int sc, String sm) {
    super.setStatus(sc, sm);
    statusType = new HttpStatus(sc, sm);
}
Also used : HttpStatus(org.apache.servicecomb.foundation.common.http.HttpStatus)

Example 2 with HttpStatus

use of org.apache.servicecomb.foundation.common.http.HttpStatus in project java-chassis by ServiceComb.

the class StandardHttpServletResponseEx method setStatus.

@SuppressWarnings("deprecation")
@Override
public void setStatus(int sc, String sm) {
    super.setStatus(sc, sm);
    statusType = new HttpStatus(sc, sm);
}
Also used : HttpStatus(org.apache.servicecomb.foundation.common.http.HttpStatus)

Example 3 with HttpStatus

use of org.apache.servicecomb.foundation.common.http.HttpStatus in project java-chassis by ServiceComb.

the class RestClientSender method createResponse.

protected Response createResponse(HttpClientResponse httpClientResponse, Object result) {
    // http2's :status header will cause edge forward failed
    MultiMap headers = httpClientResponse.headers();
    headers.remove(":status");
    HttpStatus httpStatus = new HttpStatus(httpClientResponse.statusCode(), httpClientResponse.statusMessage());
    return Response.status(httpStatus).setHeaders(headers).entity(result);
}
Also used : MultiMap(io.vertx.core.MultiMap) HttpStatus(org.apache.servicecomb.foundation.common.http.HttpStatus)

Aggregations

HttpStatus (org.apache.servicecomb.foundation.common.http.HttpStatus)3 MultiMap (io.vertx.core.MultiMap)1