io.netty.handler.codec.http.HttpRequest.setUri()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中io.netty.handler.codec.http.HttpRequest.setUri()方法的一些代码示例,展示了HttpRequest.setUri()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.setUri()方法的具体详情如下:
包路径:io.netty.handler.codec.http.HttpRequest
类名称:HttpRequest
方法名:setUri

HttpRequest.setUri介绍

[英]Set the requested URI (or alternatively, path)
[中]设置请求的URI(或者路径)

代码示例

代码示例来源:origin: eclipse-vertx/vert.x

@Override
public HttpRequest setUri(String uri) {
 return request.setUri(uri);
}

代码示例来源:origin: wildfly/wildfly

@Override
public FullHttpRequest setUri(String uri) {
  ((HttpRequest) message).setUri(uri);
  return this;
}

代码示例来源:origin: wildfly/wildfly

@Override
public HttpRequest setUri(String uri) {
  request.setUri(uri);
  return this;
}

代码示例来源:origin: micronaut-projects/micronaut-core

@Override
public HttpRequest setUri(String uri) {
  request.setUri(uri);
  return this;
}

代码示例来源:origin: JZ-Darkal/AndroidHttpCapture

httpRequest.setUri(rewrittenUrl);
} else {
  try {
    String resource = BrowserMobHttpUtil.getRawPathAndParamsFromUri(rewrittenUrl);
    httpRequest.setUri(resource);
  } catch (URISyntaxException e) {
        e);
    httpRequest.setUri(rewrittenUrl);

代码示例来源:origin: micronaut-projects/micronaut-core

);
        try {
          nettyRequest.setUri(requestURI.toURL().getFile());
        } catch (MalformedURLException e) {
  nettyRequest.setUri(requestURI.toURL().getFile());
} catch (MalformedURLException e) {

代码示例来源:origin: io.vertx/vertx-core

@Override
public HttpRequest setUri(String uri) {
 return request.setUri(uri);
}

代码示例来源:origin: twitter/netty-http2

@Override
public HttpRequest setUri(String uri) {
  request.setUri(uri);
  return this;
}

代码示例来源:origin: io.netty/netty-codec-http

@Override
public FullHttpRequest setUri(String uri) {
  ((HttpRequest) message).setUri(uri);
  return this;
}

代码示例来源:origin: com.typesafe.netty/netty-reactive-streams-http

@Override
public HttpRequest setUri(String uri) {
  request.setUri(uri);
  return this;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
public HttpRequest setUri(String uri) {
  request.setUri(uri);
  return this;
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public HttpRequest setUri(String uri) {
  this.request.setUri(uri);
  return this;
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

@Override
public HttpRequest setUri(String uri) {
  request.setUri(uri);
  return this;
}

代码示例来源:origin: org.wso2.transport.http/org.wso2.transport.http.netty

public void setUri(String uri) {
    this.httpRequest.setUri(uri);
  }
}

代码示例来源:origin: io.netty/netty-codec-http

@Override
public HttpRequest setUri(String uri) {
  request.setUri(uri);
  return this;
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

@Override
public FullHttpRequest setUri(String uri) {
  ((HttpRequest) message).setUri(uri);
  return this;
}

代码示例来源:origin: software.amazon.awssdk/netty-nio-client

@Override
public HttpRequest setUri(String uri) {
  this.request.setUri(uri);
  return this;
}

代码示例来源:origin: apache/activemq-artemis

@Override
public FullHttpRequest setUri(String uri) {
  ((HttpRequest) message).setUri(uri);
  return this;
}

代码示例来源:origin: io.higgs/ws-client

protected void encodeInitialLine(ByteBuf buf, HttpRequest request) throws Exception {
    //because proxies are going to return a 400 for an "invalid" protocol/scheme
    //String uri = fullUrl.replace("ws://", "http://");
    request.setUri(fullUrl);
    super.encodeInitialLine(buf, request);
    pipeline.remove(this);
    pipeline.addLast("http-encoder", new HttpRequestEncoder());
  }
});

代码示例来源:origin: io.reactivex/rxnetty

protected HttpClientRequest<I> createRedirectRequest(HttpClientRequest<I> original, URI redirectLocation,
                           int redirectStatus) {
  HttpRequest nettyRequest = original.getNettyRequest();
  nettyRequest.setUri(getNettyRequestUri(redirectLocation, original.getUri(), redirectStatus));
  HttpClientRequest<I> newRequest = new HttpClientRequest<I>(nettyRequest, original);
  if (redirectStatus == 303) {
    // according to HTTP spec, 303 mandates the change of request type to GET
    nettyRequest.setMethod(HttpMethod.GET);
    // If it is a get, then the content is not to be sent.
    newRequest.removeContent();
  }
  return newRequest;
}

相关文章