Skip to content

Instantly share code, notes, and snippets.

@thiagofm
Created October 31, 2013 13:17
Show Gist options
  • Save thiagofm/7249528 to your computer and use it in GitHub Desktop.
Save thiagofm/7249528 to your computer and use it in GitHub Desktop.
boxes
require 'net/http'
def build_box_ids ids
ids.map!{|id| {'box_ids[]' => id}}
.inject({}.compare_by_identity, :merge)
end
uri = URI('http://localhost:9000/lock/stale')
p req = Net::HTTP.post_form(uri, build_box_ids(['box1', 'box2']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment