Polishing
This commit is contained in:
parent
d9c63182d9
commit
6710291bbd
|
|
@ -288,8 +288,8 @@ class DefaultWebClient implements WebClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T, P extends Publisher<T>> RequestHeadersSpec<?> body(P publisher,
|
public <T, P extends Publisher<T>> RequestHeadersSpec<?> body(
|
||||||
ParameterizedTypeReference<T> typeReference) {
|
P publisher, ParameterizedTypeReference<T> typeReference) {
|
||||||
|
|
||||||
this.inserter = BodyInserters.fromPublisher(publisher, typeReference);
|
this.inserter = BodyInserters.fromPublisher(publisher, typeReference);
|
||||||
return this;
|
return this;
|
||||||
|
|
@ -443,7 +443,6 @@ class DefaultWebClient implements WebClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Mono<WebClientResponseException> createResponseException(ClientResponse response) {
|
private static Mono<WebClientResponseException> createResponseException(ClientResponse response) {
|
||||||
|
|
||||||
return DataBufferUtils.join(response.body(BodyExtractors.toDataBuffers()))
|
return DataBufferUtils.join(response.body(BodyExtractors.toDataBuffers()))
|
||||||
.map(dataBuffer -> {
|
.map(dataBuffer -> {
|
||||||
byte[] bytes = new byte[dataBuffer.readableByteCount()];
|
byte[] bytes = new byte[dataBuffer.readableByteCount()];
|
||||||
|
|
|
||||||
|
|
@ -297,8 +297,8 @@ public abstract class RequestPredicates {
|
||||||
* @param name the name of the query parameter to test against
|
* @param name the name of the query parameter to test against
|
||||||
* @param value the value of the query parameter to test against
|
* @param value the value of the query parameter to test against
|
||||||
* @return a predicate that matches if the query parameter has the given value
|
* @return a predicate that matches if the query parameter has the given value
|
||||||
* @see ServerRequest#queryParam(String)
|
|
||||||
* @since 5.0.7
|
* @since 5.0.7
|
||||||
|
* @see ServerRequest#queryParam(String)
|
||||||
*/
|
*/
|
||||||
public static RequestPredicate queryParam(String name, String value) {
|
public static RequestPredicate queryParam(String name, String value) {
|
||||||
return queryParam(name, new Predicate<String>() {
|
return queryParam(name, new Predicate<String>() {
|
||||||
|
|
@ -306,7 +306,6 @@ public abstract class RequestPredicates {
|
||||||
public boolean test(String s) {
|
public boolean test(String s) {
|
||||||
return s.equals(value);
|
return s.equals(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("== %s", value);
|
return String.format("== %s", value);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue