mirror of
https://github.com/foss42/apidash.git
synced 2025-10-17 03:33:07 +08:00
Request Body to String? from dynamic
This commit is contained in:
@ -116,14 +116,13 @@ import 'dart:convert';
|
||||
}
|
||||
|
||||
var method = requestModel.method;
|
||||
if (kMethodsWithBody.contains(method) &&
|
||||
requestModel.requestBody != null) {
|
||||
var contentLength = utf8.encode(requestModel.requestBody).length;
|
||||
var requestBody = requestModel.requestBody;
|
||||
if (kMethodsWithBody.contains(method) && requestBody != null) {
|
||||
var contentLength = utf8.encode(requestBody).length;
|
||||
if (contentLength > 0) {
|
||||
hasBody = true;
|
||||
var body = requestModel.requestBody;
|
||||
var templateBody = jj.Template(kTemplateBody);
|
||||
result += templateBody.render({"body": body});
|
||||
result += templateBody.render({"body": requestBody});
|
||||
result = kBodyImportDartConvert + result;
|
||||
result += kBodyLength;
|
||||
}
|
||||
|
Reference in New Issue
Block a user