You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.
First of all
I'm using this library well in my project. Thank you!!.
I found an issue that it doesn't allow empty request body except GET
### Send request with no request's body
POST https://httpbin.org/post
> {%
client.test("Response is ok", function() {
client.assert(response.status === 200, "Response status is not ok");
});
%}
Perhaps this is the effect of the OkHttpRequest library.
However it doesn't matter in IntelliJ, and it works well.
How about using default request body if request doesn't have a request body when http method is post, put, patch..
// example
private fun getRequestBody(request: Request): RequestBody? {
val body = request.body?.toRequestBody() ?: request.createMultipartRequestBody()
if (HttpMethod.requiresRequestBody(request.method.name) && body == null) {
return "{}".toRequestBody()
}
return body
}
so if you don't mind i can raise a PR soon
with pleasure
The text was updated successfully, but these errors were encountered:
10000-ki
changed the title
Unable to run with out request body when http method is post
Unable to run without request body when http method is post
Aug 3, 2021
10000-ki
changed the title
Unable to run without request body when http method is post
Suggestion: use default request body
Aug 3, 2021
10000-ki
changed the title
Suggestion: use default request body
Suggestion: Use default request body When POST, PUT, PATCH...
Aug 3, 2021
10000-ki
changed the title
Suggestion: Use default request body When POST, PUT, PATCH...
Suggestion: Use default request body if request body is null when POST, PUT, PATCH...
Aug 3, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello there,
First of all
I'm using this library well in my project. Thank you!!.
I found an issue that it doesn't allow empty request body except GET
Perhaps this is the effect of the OkHttpRequest library.
OkhttpRequestExecutor.kt
Request.kt
However it doesn't matter in IntelliJ, and it works well.
How about using default request body if request doesn't have a request body when http method is post, put, patch..
so if you don't mind i can raise a PR soon
with pleasure
The text was updated successfully, but these errors were encountered: