File tree 2 files changed +7
-8
lines changed
main/java/org/springframework/web/reactive/function/client
test/java/org/springframework/web/reactive/function/client
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -349,14 +349,14 @@ interface UriSpec<S extends RequestHeadersSpec<?>> {
349
349
S uri (String uri , Map <String , ?> uriVariables );
350
350
351
351
/**
352
- * Build the URI for the request using the {@link UriBuilderFactory}
353
- * configured for this client and initialized with the specified <code>uri</code>.
352
+ * Specify the URI starting with a URI template and finishing off with a
353
+ * {@link UriBuilder} created from the template.
354
+ * @since 5.2
354
355
*/
355
356
S uri (String uri , Function <UriBuilder , URI > uriFunction );
356
357
357
358
/**
358
- * Build the URI for the request using the {@link UriBuilderFactory}
359
- * configured for this client.
359
+ * Specify the URI by through a {@link UriBuilder}.
360
360
* @see #uri(String, Function)
361
361
*/
362
362
S uri (Function <UriBuilder , URI > uriFunction );
Original file line number Diff line number Diff line change @@ -84,16 +84,15 @@ public void uriBuilder() {
84
84
assertEquals ("/base/path?q=12" , request .url ().toString ());
85
85
}
86
86
87
-
88
- @ Test
87
+ @ Test // gh-22705
89
88
public void uriBuilderWithUriTemplate () {
90
89
this .builder .build ().get ()
91
90
.uri ("/path/{id}" , builder -> builder .queryParam ("q" , "12" ).build ("identifier" ))
92
91
.exchange ().block (Duration .ofSeconds (10 ));
93
92
94
93
ClientRequest request = verifyAndGetRequest ();
95
94
assertEquals ("/base/path/identifier?q=12" , request .url ().toString ());
96
- assertEquals ("/path/{id}" , request .attribute (WebClient .class .getName () + ".uriTemplate" ).< String > get ());
95
+ assertEquals ("/path/{id}" , request .attribute (WebClient .class .getName () + ".uriTemplate" ).get ());
97
96
}
98
97
99
98
@ Test
You can’t perform that action at this time.
0 commit comments