Gossamer Forum
Home : Gossamer Threads Inc. : Discussion :

suggestion for GT::URI

Quote Reply
suggestion for GT::URI
Hi,

In GT::URI::get, could something like the following be added, or am I oversimplifying thing?
Code:
if( $url =~ /^https/ ) {
use GT::URI::HTTPS;
my $r->{$url}{buffer} = GT::URI::HTTPS->get($url);
return $r;
} else {
return GT::URI->get( $url );
}

To summarize: it would be nice if I don't have to decide whether to call GT::URI::get() or GT::URI::HTTPS::get() myself. And it would be nice if both functions return their result in the same structure (or if at least it would be documented what is returned).

Thanks, Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] suggestion for GT::URI In reply to
Hi Jasper,

I've written a replacement, GT::WWW, which should start appearing with our programs sometime soon and makes GT::URI obselete. It's designed to be a much more generic module, with standardized and less complex (but more complete) return values. It currently supports HTTP and HTTPS, including GET and POST support, the ability to handle file uploads, basic HTTP authentication, and gzip/deflate transfer support (if Compress::Zlib is available) to name a few.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] suggestion for GT::URI In reply to
Any idea when you will publish it?

Jasper

http://www.bookings.org