Permalink
Browse files

Actually calling version function.

  • Loading branch information...
1 parent d2162c0 commit 9eaaa39931e6b8155e91df78998ac5fd390799bf Andrew Kirilenko committed Jul 8, 2012
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/client.coffee
View
@@ -77,7 +77,7 @@ class Client
request_info =
method: 'GET'
uri: @url() + method
- headers: @headers
+ headers: @headers()
qs: params
@request(request_info, cb)
@@ -86,7 +86,7 @@ class Client
request_info =
method: 'POST'
uri: @url() + method
- headers: @headers
+ headers: @headers()
json: params
@request(request_info, cb)
@@ -95,7 +95,7 @@ class Client
request_info =
method: 'PUT'
uri: @url() + method
- headers: @headers
+ headers: @headers()
json: params
@request(request_info, cb)
@@ -104,14 +104,13 @@ class Client
request_info =
method: 'DELETE'
uri: @url() + method
- headers: @headers
+ headers: @headers()
qs: params
@request(request_info, cb)
- parse_response: (error, response, body, parse_json, cb) ->
+ parse_response: (error, response, body, cb) ->
if response.statusCode == 200
- body = JSON.parse(body) if parse_json
cb(null, body)
else
cb(new Error(body), null)

0 comments on commit 9eaaa39

Please sign in to comment.