                 break
         lines.join("\n")
 
-    @generate = (context) ->
-        request = context.getCurrentRequest()
-
+    @generateRequest = (request) ->
         view =
-            "request": context.getCurrentRequest()
+            "request": request
             "headers": @headers request
             "body": @body request
 

        }

    @auth = (request, authHeader) ->
        match = authHeader.match(/([^\s]+)\s(.*)/) || []
        scheme = match[1] || null
        params = match[2] || null

    ("#{str}").replace(/[\\']/g, '\\$&')

cURLCodeGenerator = ->
    self = this

    @headers = (request) ->
        headers = request.headers
