MCPcopy Create free account
hub / github.com/FongMi/TV / getFormBody

Method getFormBody

quickjs/src/main/java/com/fongmi/quickjs/utils/Connect.java:80–85  ·  view source on GitHub ↗
(Req req)

Source from the content-addressed store, hash-verified

78 }
79
80 private static RequestBody getFormBody(Req req) {
81 FormBody.Builder builder = new FormBody.Builder();
82 Map<String, String> params = Json.toMap(req.getData());
83 for (String key : params.keySet()) builder.add(key, params.get(key));
84 return builder.build();
85 }
86
87 private static RequestBody getFormDataBody(Req req) {
88 String boundary = "--dio-boundary-" + new SecureRandom().nextInt(42949) + new SecureRandom().nextInt(67296);

Callers 1

getPostBodyMethod · 0.95

Calls 5

toMapMethod · 0.95
getDataMethod · 0.45
addMethod · 0.45
getMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected