本文整理了Java中io.netty.handler.codec.http.HttpResponse.setStatus()
方法的一些代码示例,展示了HttpResponse.setStatus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpResponse.setStatus()
方法的具体详情如下:
包路径:io.netty.handler.codec.http.HttpResponse
类名称:HttpResponse
方法名:setStatus
[英]Set the status of this HttpResponse.
[中]
代码示例来源:origin: wildfly/wildfly
@Override
public FullHttpResponse setStatus(HttpResponseStatus status) {
((HttpResponse) message).setStatus(status);
return this;
}
代码示例来源:origin: micronaut-projects/micronaut-core
@Override
public HttpResponse setStatus(HttpResponseStatus status) {
response.setStatus(status);
return this;
}
代码示例来源:origin: micronaut-projects/micronaut-core
@Override
public HttpResponse setStatus(HttpResponseStatus status) {
response.setStatus(status);
return this;
}
代码示例来源:origin: com.typesafe.netty/netty-reactive-streams-http
@Override
public HttpResponse setStatus(HttpResponseStatus status) {
response.setStatus(status);
return this;
}
代码示例来源:origin: io.netty/netty-codec-http
@Override
public FullHttpResponse setStatus(HttpResponseStatus status) {
((HttpResponse) message).setStatus(status);
return this;
}
代码示例来源:origin: org.apache.activemq/artemis-jms-client-all
@Override
public FullHttpResponse setStatus(HttpResponseStatus status) {
((HttpResponse) message).setStatus(status);
return this;
}
代码示例来源:origin: apache/activemq-artemis
@Override
public FullHttpResponse setStatus(HttpResponseStatus status) {
((HttpResponse) message).setStatus(status);
return this;
}
代码示例来源:origin: io.reactivex/rxnetty
public void setStatus(HttpResponseStatus status) {
nettyResponse.setStatus(status);
}
代码示例来源:origin: twitter/netty-http2
@Override
public HttpResponse setStatus(HttpResponseStatus status) {
response.setStatus(status);
return this;
}
代码示例来源:origin: io.reactivex/rxnetty
@Override
public FullHttpResponse setStatus(HttpResponseStatus status) {
headers.setStatus(status);
return this;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public FullHttpResponse setStatus(HttpResponseStatus status) {
((HttpResponse) message).setStatus(status);
return this;
}
代码示例来源:origin: reactor/reactor-netty
@Override
public HttpServerResponse status(HttpResponseStatus status) {
if (!hasSentHeaders()) {
this.nettyResponse.setStatus(status);
}
else {
throw new IllegalStateException("Status and headers already sent");
}
return this;
}
代码示例来源:origin: Leibnizhu/spring-boot-starter-netty
@Override
@Deprecated
public void setStatus(int sc, String sm) {
response.setStatus(new HttpResponseStatus(sc, sm));
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http-netty-server
public void sendError(int sc) throws IOException {
this.originalResponse.setStatus(HttpResponseStatus.valueOf(sc));
}
代码示例来源:origin: Leibnizhu/spring-boot-starter-netty
@Override
public void sendRedirect(String location) throws IOException {
checkNotCommitted();
response.setStatus(HttpResponseStatus.FOUND);
response.headers().set("Location", location);
}
代码示例来源:origin: Leibnizhu/spring-boot-starter-netty
@Override
public void sendError(int sc, String msg) throws IOException {
checkNotCommitted();
response.setStatus(new HttpResponseStatus(sc, msg));
}
代码示例来源:origin: Leibnizhu/spring-boot-starter-netty
@Override
public void sendError(int sc) throws IOException {
checkNotCommitted();
response.setStatus(HttpResponseStatus.valueOf(sc));
}
代码示例来源:origin: yu199195/Jinx
@Override
public void sendError(int sc, String msg) throws IOException {
checkNotCommitted();
response.setStatus(new HttpResponseStatus(sc, msg));
}
代码示例来源:origin: yu199195/Jinx
@Override
public void sendError(int sc) throws IOException {
checkNotCommitted();
response.setStatus(HttpResponseStatus.valueOf(sc));
}
代码示例来源:origin: Nike-Inc/riposte
@Override
public void handleDownstreamResponseFirstChunk(HttpResponse downstreamResponseFirstChunk, RequestInfo<?> origRequestInfo) {
downstreamResponseFirstChunk.headers().set(ORIG_HTTP_STATUS_CODE_RESPONSE_HEADER_KEY,
String.valueOf(downstreamResponseFirstChunk.status().code()));
downstreamResponseFirstChunk.setStatus(new HttpResponseStatus(MODIFIED_HTTP_STATUS_RESPONSE_CODE, "junk status code"));
}
内容来源于网络,如有侵权,请联系作者删除!