I can haz HTTP: Consuming and producing HTTP APIs in the Ruby ecosystem

A session at RubyConf India 2011

Saturday 28th May, 2011

2:00pm to 2:45pm (HMT)

The Ruby ecosystem is pretty awesome when it comes to developing or
consuming HTTP APIs. On the publishing front, the Rails framework is
an attractive option because it supports publishing what are popularly
(but inaccurately) referred to as 'RESTful' APIs quickly and
effortlessly. On the consumer side, the Ruby ecosystem provides
several very fluent and powerful libraries that make it easy to
consume HTTP based APIs.

Since a significant proportion of projects today require that APIs be
both published and consumed, many of them wind up choosing Ruby as a
platform for the reasons mentioned above. This talk is targeted at
folks that are currently on such projects, or anticipate being on such
projects in the future.

We will cover:
Consuming HTTP APIs:
1) The basics of making HTTP calls with Ruby
2) The strengths and weaknesses of Ruby's Net::HTTP across 1.8, 1.9
and JRuby (possibly Rubinius if we have the time to do research)
3) Popular HTTP libraries that either make it easier to do HTTP by
providing better APIs, make it faster by using libCurl or both
4) Different approaches to deserializing popular encoding formats such
as XML and JSON and the pitfalls thereof

Producing HTTP APIs using Rails:
1) The basics of REST
2) What Rails gives you out of the box - content-type negotiation,
deserialization etc. and the limitations thereof
3) What Rails fails to give you out of the box - hypermedia controls etc.
4) What Rails does wrong - wrong PUT semantics, no support for PATCH,
error handling results in responses that violate the clients Accepts
header constraints etc.
4) How one can achieve Level 2 on the Richardson Maturity Model of
REST using Rails
5) Writing tests for all of this

At the end of this, our audience will understand how you can both
consume and produce HTTP APIs in the Ruby ecosystem. They will also
have a clear idea of what the limitations of such systems are and what
the can do to work around the limitations.

About the speakers

This person is speaking at this event.
Niranjan Paranjape

Hacker. CTO and co-founder of C42 Engineering, a Ruby on Rails consulting firm.

This person is speaking at this event.
Sidu Ponnappa

Hacker. CEO of C42 Engineering, the boutique Ruby consultancy behind rubymonk.com. In past lives I worked at ThoughtWorks and co-founded inactiv.com.

Coverage of this session

Sign in to add slides, notes or videos to this session

Tell your friends!


Time 2:00pm2:45pm HMT

Date Sat 28th May 2011

Short URL


Official event site


View the schedule



See something wrong?

Report an issue with this session