mirror of
https://github.com/foss42/apidash.git
synced 2025-05-30 05:21:15 +08:00
request sending setup
This commit is contained in:
@ -132,6 +132,21 @@ puts "Response Body: #{response.body}"
|
|||||||
result += templateConnection.render({
|
result += templateConnection.render({
|
||||||
"hasFile": requestModel.hasFormDataContentType && requestModel.hasFileInFormData //
|
"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) {
|
} catch (e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user