I used JSON::RPC::Client to open up a bunch of services to my application's architecture over HTTPS. I also require HTTPS basic authentication with all requests which JSON::RPC::Client is able to handle upon initialization. It has worked well thus far and I found that it actually uses LWP behind the scenes. Although, that part was not well documented. I have attached a testing script (real values removed, of course) that I use to access my services when I make changes to them. Peter, if you find this of any interest, I can also forward the service library that I wrote to handle all of the JSON::RPC requests (it actually also handles XML::RPC requests). Let me know. --Dan
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Uri Guttman Sent: Wednesday, February 16, 2011 4:09 PM To: Peter Wood Cc: [email protected] Subject: Re: [Boston.pm] Lightweight module for web service calls? >>>>> "PW" == Peter Wood <[email protected]> writes: PW> Hi Uri, >> https is just http over an ssl socket with a different port than >> http. you can use IO::Socket::SSL for that. but the problems you will >> run into are wide and varied which is why LWP is so large. if you know >> your http transactions will be very basic and not need help, it is PW> easy >> to write a simple module. but it is so easy to get things wrong and PW> when >> it gets more complicated, you will want LWP. PW> The requests are going to be in the form of POST requests using PW> structured URLs with an optional POST body payload, the responses will PW> be JSON. I feel like that's simple enough to warrant a barebones module. PW> That being said, I should probably write a simple socket module and do PW> some tests to compare it to LWP to confirm that LWP has as much overhead PW> as I think it does. it won't have as much as you think. parsing http headers is work as is generating them. the delays in response from the server will likely dwarf the cpu usage anyhow. is it worth your time to write this code? and it will take longer to write than you think. uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm
_______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

