The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Proposal: Net::HTTP user-agent class for Ruby stdlib

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Hodel

Posts: 660
Nickname: drbrain
Registered: Mar, 2006

Eric Hodel is a long-time Rubyist and co-founder of Seattle.rb.
Proposal: Net::HTTP user-agent class for Ruby stdlib Posted: Jul 25, 2011 2:24 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: Proposal: Net::HTTP user-agent class for Ruby stdlib
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Hodel
Latest Posts From Segment7

Advertisement

I have proposed adding a new class to Ruby's standard library that makes Net::HTTP easier to use. You can read my HTTP user-agent class proposal on redmine.

The first question is not "What should the API look like?" but "Should it be in the standard library?". My argument is this:

I have had discussions where people say "Net::HTTP's API is not very good" and people seem to want a better way to use Net::HTTP without trying out one of the many Net::HTTP::Agent-like extensions to the base API.

Having a recommended way to perform HTTP access in ruby will be useful to the community since they don't have to do any additional research. Also users will be able perform basic HTTP requests for multiple servers and will gain the efficiencies of persistent connections without extra work.

The biggest issue people have is that they need to pass the host, port and SSL params for every HTTP connection made. The nature of the API means that most people make a new connection for every request. Since this is confusing for new users and annoying for experienced users I think it should be addressed in stdlib.

Do you think a smoother API for performing HTTP requests would be useful in Ruby's standard library? If you do (or don't) I'd appreciate further discussion on the ticket.

Read: Proposal: Net::HTTP user-agent class for Ruby stdlib

Topic: Proposal: Net::HTTP user-agent class for Ruby stdlib Previous Topic   Next Topic Topic: Why don't you use and review these useful Ruby Gems?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use