# Geturl with net/http package

**URL:** <https://rubytalk.org/t/geturl-with-net-http-package/20292>\
**Category:** ruby-talk\
**Created:** [19 August 2005 17:17 UTC](https://rubytalk.org/t/geturl-with-net-http-package/20292 "2005-08-19T17:17:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berger\_Daniel1](https://avatars.discourse-cdn.com/v4/letter/b/ecc23a/32.png) [@Berger\_Daniel1](https://rubytalk.org/u/Berger_Daniel1)\
**Post date:** [19 August 2005 17:17 UTC](https://rubytalk.org/t/geturl-with-net-http-package/20292/1 "2005-08-19T17:17:14Z")

</div>

Sounds good. I'll submit a patch (or you can, if you prefer).

Regards,

Dan

> **···**
>
> > -----Original Message-----  
> > From: mathew [mailto:meta@pobox.com]  
> > Sent: Friday, August 19, 2005 10:06 AM  
> > To: ruby-talk ML  
> > Subject: Re: Geturl with net/http package
> > 
> > Daniel Berger wrote:  
> > \>Mohit Muthanna wrote:  
> > \>\>Remove the 'http://' from the 'server' variable.  
> > \>  
> > \> It would take a minimal amount of code to make it work with  
> > or without  
> > \> the "http://" prefix. Any chance this could be patched?  
> > \>  
> > \> I also recommend accessors for @address and @port.
> > 
> > You should be using the URI class to parse and assemble URLs;  
> > there's no  
> > need to duplicate that functionality in net/http. URI  
> > provides address  
> > and port accessors. Also, if you want an easy wrapper around net/http  
> > and uri, there's already open-uri.
> > 
> > (Also, I've contributed some improved documentation for  
> > net/http which  
> > will hopefully make it to ruby-doc.org soon.)
