File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
http-client/src/main/java/io/avaje/http/client
http-generator-client/src/main/java/io/avaje/http/generator/client Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,17 @@ final class DUrlBuilder implements UrlBuilder {
1515
1616 @ Override
1717 public UrlBuilder url (String url ) {
18- buffer .delete (0 , buffer .length ());
18+
19+ if (url .startsWith ("http" ) && url .contains ("://" )) {
20+ buffer .setLength (0 );
21+ }
22+
1923 buffer .append (url );
2024 return this ;
2125 }
2226
2327 @ Override
2428 public UrlBuilder path (String path ) {
25- if (path .startsWith ("http" ) && path .contains ("://" )) {
26- return url (path );
27- }
2829 buffer .append ("/" ).append (path );
2930 return this ;
3031 }
Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ private void writePaths(Set<PathSegments.Segment> segments) {
382382 continue ;
383383 }
384384 if (first ) {
385- writer .append (".path (\" " );
385+ writer .append (".url (\" " );
386386 first = false ;
387387 }
388388 if (noSlash ) {
You can’t perform that action at this time.
0 commit comments