lib/ezlinkedin/request.rb in ezlinkedin-0.1.2 vs lib/ezlinkedin/request.rb in ezlinkedin-0.2.2

- old
+ new

@@ -19,9 +19,15 @@ response = access_token.post("#{API_PATH}#{path}", body, DEFAULT_HEADERS.merge(options)) raise_errors(response) response end + def put(path, body='', options={}) + response = access_token.put("#{API_PATH}#{path}", body, DEFAULT_HEADERS.merge(options)) + raise_errors(response) + response + end + private def raise_errors(response) # Even if the json answer contains the HTTP status code, LinkedIn also sets this code # in the HTTP answer (thankfully).