Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private RequestBody buildOkHttpRequestBody(
com.wechat.pay.java.core.http.RequestBody wechatPayRequestBody) {
if (wechatPayRequestBody == null) {
// create an empty request body
return RequestBody.create("", null);
return createOkHttpEmptyRequestBody();
}
if (wechatPayRequestBody instanceof JsonRequestBody) {
return createOkHttpRequestBody(wechatPayRequestBody);
Expand All @@ -95,6 +95,10 @@ private okhttp3.RequestBody createRequestBody(byte[] content, okhttp3.MediaType
return okhttp3.RequestBody.create(mediaType, content);
}

private RequestBody createOkHttpEmptyRequestBody() {
return createRequestBody("", null);
}

private RequestBody createOkHttpRequestBody(
com.wechat.pay.java.core.http.RequestBody wechatPayRequestBody) {
return createRequestBody(
Expand Down
Loading