Skip to content

Commit 1c0c774

Browse files
committed
back to path
1 parent 6e6bba8 commit 1c0c774

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

http-client/src/main/java/io/avaje/http/client/DUrlBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public UrlBuilder url(String url) {
2626

2727
@Override
2828
public UrlBuilder path(String path) {
29+
if (path.startsWith("http") && path.contains("://")) {
30+
buffer.setLength(0);
31+
return this;
32+
}
2933
buffer.append("/").append(path);
3034
return this;
3135
}

http-generator-client/src/main/java/io/avaje/http/generator/client/ClientMethodWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ private void writePaths(Set<PathSegments.Segment> segments) {
382382
continue;
383383
}
384384
if (first) {
385-
writer.append(".url(\"");
385+
writer.append(".path(\"");
386386
first = false;
387387
}
388388
if (noSlash) {

0 commit comments

Comments
 (0)