mirror of
https://github.com/foss42/apidash.git
synced 2025-12-10 23:36:46 +08:00
modify core http_service
This commit is contained in:
@@ -41,7 +41,10 @@ Future<(HttpResponse?, Duration?, String?)> sendHttpRequest(
|
||||
if (kMethodsWithBody.contains(requestModel.method)) {
|
||||
var requestBody = requestModel.body;
|
||||
if (requestBody != null && !isMultiPartRequest) {
|
||||
var contentLength = utf8.encode(requestBody).length;
|
||||
if (requestModel.hasJsonData) {
|
||||
requestBody = removeJsonComments(requestBody);
|
||||
}
|
||||
var contentLength = utf8.encode(requestBody!).length;
|
||||
if (contentLength > 0) {
|
||||
body = requestBody;
|
||||
headers[HttpHeaders.contentLengthHeader] =
|
||||
|
||||
Reference in New Issue
Block a user