New version of LWP::Simple using URI module for URI parsing and adding post method with working JSON-RPC tests. #6

merged 3 commits into from Aug 24, 2011

2 participants



The current LWP::Simple did its own URI parsing. I have been trying to work on a relatively complete and robust URI parser module which implements the RFC 3986 BNF for URIs with a Perl6 grammar. This fork modifies LWP::Simple to use that module. As discussed in an issue I raised a few days ago, there are concerns with using http message content data with a GET request and the JSON-RPC server that was used by the custom-headers-and-content.t tests is no longer available. I have put up a basic perl5 based JSON-RPC server with an echo method on one of my own domains and have added a post method to LWP-Simple so that the test file now runs. I also added an additional test to actually test the successful retrieval of a file protected by basic authentication.

If there are any concerns about my fork that I can address that would make it easier to merge please let me know.


@tadzik tadzik and 1 other commented on an outdated diff Aug 23, 2011
method has_basic_auth (Str $host) {
# ^ <username> : <password> @ <hostname> $
+ warn "has_basic_auth deprecated - not in p5 LWP simple and now returned by pares_url";
tadzik added a note Aug 23, 2011

typo? parse_url I suppose.

Also, I don't really understand the second part of this message.

I fixed the typo and the second part of the message is trying to say that if you want the basic auth info (user and password) it is now returned by parse_url, as a result of URL parsing, as the last parameter. The part about "p5 LWP simple" just notes that there is no method like this in the Perl 5 LWP::simple module. If you feel the warning needs further clarification, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@cosimo cosimo merged commit 1c5c2c4 into cosimo:master Aug 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment