perl6-http-client
perl6-http-client copied to clipboard
HTTP::Client test errors
Without running the internal HTTP::Easy example, i cannot depend on HTTP::Client. Could you explain what the issue you are having with rakudo perl6? I want to use HTTP::Client for https://github.com/azawawi/farabi6/
Even if i install HTTP::Client without executing any tests, i still get "Failed to get $url":
use HTTP::Client;
my $client = HTTP::Client.new;
my $url = 'http://google.com';
my $response = $client.get($url);
if ($response.success) {
say "Got the following: $url";
} else {
say "Failed while getting $url";
}
I honestly don't know what the issue is with HTTP::Client. It refuses to bind to any address other than localhost. I need to go back an do a wholesale rewrite on this library. It was originally inspired by the LWP::Simple library, but designed to have a simpler, more Perl 6ish API. It's next on my list of modules needing some love. There are plenty of things that have come into existence since it was last worked on, such as Buf support, that would make it a lot nicer.
I am slowly working on a wholesale rewrite of the HTTP::Client library, which will support Buf, fix the chunked data transfers, use the URI library instead of my very limited URL grammar, and more. I'll see if I can figure out the issues with binding to an outside address while I'm at it.
Any update on this one?
Rewrite resumes shortly.
Is the rewrite still NYI?
This project is currently unmaintained. If someone wants to take it over, feel free. There are some other HTTP client libraries for Perl 6 that are far more complete than this one. I will likely rebuild this one at some point using one or more of the others as a foundation.
How about deprecating the module in README.md and suggesting better alternatives like https://github.com/sergot/http-useragent/ ?
That's a good idea azawawi. I'll do that shortly.
Ping? I'm about to suggest one (or a few) PRs, so I'd like to know if it's worth the while. I use it in my own Wikidata::API
I haven't worked on this project in a few years, and nobody seemed too interested in adopting it. I'd been recommending people move to HTTP::UserAgent which has more features. However if your PRs make this more usable again, go for it. Heck, I'll give your user direct write access on this repo!
For some reason, it's a dependence of my Wikidata::API module... So I'll be happy to keep it running. Thanks!