Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
561 changes: 508 additions & 53 deletions src/generators/go/http/sigil_emit_api.rs

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions src/generators/java/okhttp/runtime/ApiClient.java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ public class ApiClient {
}

public Request newRequest(String method, String path, Map<String, String> query, String body) {
RequestBody requestBody = null;
if (body != null) {
requestBody = RequestBody.create(body, JSON);
}
return buildRequest(method, path, query, requestBody);
}

public Request newRequestWithBody(String method, String path, Map<String, String> query, RequestBody body) {
return buildRequest(method, path, query, body);
}

private Request buildRequest(String method, String path, Map<String, String> query, RequestBody requestBody) {
String url = baseUrl.replaceAll("/+$", "") + path;
HttpUrl parsed = HttpUrl.parse(url);
if (parsed == null) {
Expand All @@ -42,11 +54,6 @@ public class ApiClient {
}
}

RequestBody requestBody = null;
if (body != null) {
requestBody = RequestBody.create(body, JSON);
}

Request.Builder builder = new Request.Builder()
.url(urlBuilder.build())
.method(method, requestBody);
Expand Down
Loading
Loading