3

I am writing a script to test various web-services in ruby. To make http requests thus far I have been using Net::HTTP but today I realized I needed to make an OPTIONS request and retrieve some JSON from the response.

Unfortunately ruby does not currently support this: https://bugs.ruby-lang.org/issues/8429

Does anyone know of gem that supports this or some other way to get this response?

2 Answers2

1

This is an alternative which supports lot of options

https://rubygems.org/gems/curb

sethi
  • 1,869
  • 2
  • 17
  • 27
  • Curb looks like it would work and I might have to take that route but as this script will be passed around to many different developers I would prefer to use self-contained gems. On my machine (Windows 7) it looks like I have to download libcurl and add it to my env variables. Would be nice to just bundle install then run the script. – Zane DeGraffenried Jun 06 '13 at 17:15
-1

Mechanize Gem

Try this gem it's very usefull and simple in use. I use it for parsing and another different tasks.

BuDen
  • 927
  • 10
  • 15