mirror of
https://github.com/foss42/apidash.git
synced 2025-05-28 20:27:04 +08:00
request sending setup
This commit is contained in:
@ -132,6 +132,21 @@ puts "Response Body: #{response.body}"
|
||||
result += templateConnection.render({
|
||||
"hasFile": requestModel.hasFormDataContentType && requestModel.hasFileInFormData //
|
||||
});
|
||||
|
||||
// start of the request sending
|
||||
var templateRequestStart = jj.Template(kTemplateRequestStart);
|
||||
result += templateRequestStart.render({
|
||||
"method": requestModel.method.name, //
|
||||
"doesMethodAcceptBody":
|
||||
kMethodsWithBody.contains(requestModel.method) && requestModel.method != HTTPVerb.delete, //
|
||||
"containsBody": requestModel.hasBody, //
|
||||
});
|
||||
|
||||
if (requestModel.hasFormDataContentType && requestModel.hasFileInFormData) {
|
||||
var templateRequestOptionsBoundary = jj.Template(kTemplateRequestOptionsBoundary);
|
||||
result += templateRequestOptionsBoundary.render({"boundary": boundary});
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user