public class HttpRequest extends Object implements Serializable
| Constructor and Description |
|---|
HttpRequest(HttpMethod httpMethod,
URL url)
Create a new HttpRequest instance.
|
HttpRequest(HttpMethod httpMethod,
URL url,
HttpHeaders headers,
reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> body)
Create a new HttpRequest instance.
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> |
body()
Get the request content.
|
HttpRequest |
body(byte[] content)
Set the request content.
|
HttpRequest |
body(reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> content)
Set request content.
|
HttpRequest |
body(String content)
Set the request content.
|
HttpRequest |
buffer()
Creates a clone of the request.
|
HttpRequest |
header(String name,
String value)
Set a request header, replacing any existing value.
|
HttpHeaders |
headers()
Get the request headers.
|
HttpRequest |
headers(HttpHeaders headers)
Set the request headers.
|
HttpMethod |
httpMethod()
Get the request method.
|
HttpRequest |
httpMethod(HttpMethod httpMethod)
Set the request method.
|
URL |
url()
Get the target address.
|
HttpRequest |
url(URL url)
Set the target address to send the request to.
|
public HttpRequest(HttpMethod httpMethod, URL url)
httpMethod - the HTTP request methodurl - the target address to send the request topublic HttpRequest(HttpMethod httpMethod, URL url, HttpHeaders headers, reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> body)
httpMethod - the HTTP request methodurl - the target address to send the request toheaders - the HTTP headers to use with this requestbody - the request contentpublic HttpMethod httpMethod()
public HttpRequest httpMethod(HttpMethod httpMethod)
httpMethod - the request methodpublic URL url()
public HttpRequest url(URL url)
url - target address as URLpublic HttpHeaders headers()
public HttpRequest headers(HttpHeaders headers)
headers - the set of headerspublic HttpRequest header(String name, String value)
value will remove the header if one with matching name exists.name - the header namevalue - the header valuepublic reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> body()
public HttpRequest body(String content)
content - the request contentpublic HttpRequest body(byte[] content)
content - the request contentpublic HttpRequest body(reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> content)
content - the request contentpublic HttpRequest buffer()
Copyright © 2019 Microsoft Corporation. All rights reserved.