In

var request = require("request");
<% if @method is "GET" and not @headers: %>
request("<%= @apiUrl %><%= @url %>", function (error, response, body) {
<% else : %>
request({
  url: "<%= @apiUrl %><%= @url %>",<% if @body: %>
  body: <%= @helpers.escape @body.join('') %>,<% end %><% if @helpers.isNotEmpty @headers: %>
  headers: {<%= ("#{@helpers.escape header}: #{@helpers.escape value}" for header,value of @headers).join(", ") %>}, <% end %>
  method: "<%= @method.toUpperCase() %>"
}, function (error, response, body) {
<% end %>  
  console.log("Status", response.statusCode);
  console.log("Headers", JSON.stringify(response.headers));
  console.log("Reponse received", body);
});