whichdigital / active-rest-client

ActiveRestClient API Client
https://rubygems.org/gems/active_rest_client
MIT License
385 stars 44 forks source link

Cannot use HTTP PATCH requests #116

Open lowjoel opened 8 years ago

lowjoel commented 8 years ago

There doesn't seem to be a way to make HTTP PATCH requests.

I get:

Uncaught exception: Invalid method patch
        vendor/bundle/ruby/2.2.0/gems/active_rest_client-1.2.0/lib/active_rest_client/request.rb:328:in `do_request'
        vendor/bundle/ruby/2.2.0/gems/active_rest_client-1.2.0/lib/active_rest_client/request.rb:173:in `block in call'
        vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `block in instrument'
        vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
        vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `instrument'
        vendor/bundle/ruby/2.2.0/gems/active_rest_client-1.2.0/lib/active_rest_client/request.rb:135:in `call'
        vendor/bundle/ruby/2.2.0/gems/active_rest_client-1.2.0/lib/active_rest_client/base.rb:139:in `method_missing'
        lib/coursemology/evaluator/client.rb:65:in `block in on_evaluation'
        vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `block in instrument'
        vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
        vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `instrument'
        lib/coursemology/evaluator/client.rb:64:in `on_evaluation'
        lib/coursemology/evaluator/client.rb:50:in `block in on_allocate'
        vendor/bundle/ruby/2.2.0/gems/active_rest_client-1.2.0/lib/active_rest_client/result_iterator.rb:36:in `block in each'
        vendor/bundle/ruby/2.2.0/gems/active_rest_client-1.2.0/lib/active_rest_client/result_iterator.rb:35:in `each'
        vendor/bundle/ruby/2.2.0/gems/active_rest_client-1.2.0/lib/active_rest_client/result_iterator.rb:35:in `each'
        lib/coursemology/evaluator/client.rb:49:in `on_allocate'
        lib/coursemology/evaluator/client.rb:39:in `allocate_evaluations'
        lib/coursemology/evaluator/client.rb:19:in `block in run'
        lib/coursemology/evaluator/client.rb:18:in `loop'
        lib/coursemology/evaluator/client.rb:18:in `run'
        lib/coursemology/evaluator/cli.rb:18:in `run'
        lib/coursemology/evaluator/cli.rb:11:in `start'
        lib/coursemology/evaluator/cli.rb:7:in `start'
        bin/evaluator:6:in `<top (required)>'
andyjeffries commented 8 years ago

I've fixed this in v1.2.14 of my Flexirest fork. Thanks for the report. https://www.andyjeffries.co.uk/what-is-flexirest/

lowjoel commented 8 years ago

Awesome, I'm switching :)

edwardjrp commented 7 years ago

Thanks mate, this is great. Switching!!!!!