Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: modern ways of doing web services - avoid REST too

by Rhandom (Curate)
on Sep 27, 2013 at 15:32 UTC ( #1056003=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       my $client = API::Client->new({service => "dist"});
       my $data = $client->server_info({hostname => "foo.bar.com"});
       # this maps out to https://someserver.com/dist/server_info POSTing 
    +{"hostname":"foo.bar.com"}
    
  2. or download this
    package DistService;
    use API::Base;
    ...
        ...
        return \%data;
    }
    
  3. or download this
    [rhandom@somehost ~/%] ds server_info hostname foo.bar.com
    Arguments:
    ...
    | ip            | 0.0.6.11            |
    | server_id     | 26208               |
    +---------------+---------------------+
    
  4. or download this
    0.0.20.86 - - [27/Sep/2013:08:12:50 -0600] "POST /dist/server_info HTT
    +P/1.0" 200 292 "-" "-"
    0.0.66.29 - - [27/Sep/2013:08:12:50 -0600] "POST /dist/unmanaged_add H
    +TTP/1.0" 200 21 "-" "-"
    ...
    0.0.44.15 - - [27/Sep/2013:08:12:52 -0600] "POST /dist/server_info HTT
    +P/1.0" 200 294 "-" "-"
    0.0.33.11 - - [27/Sep/2013:08:12:52 -0600] "POST /dist/server_info HTT
    +P/1.0" 200 293 "-" "-"
    0.0.15.80 - - [27/Sep/2013:08:12:52 -0600] "POST /dist/server_info HTT
    +P/1.0" 200 290 "-" "-"
    
  5. or download this
    0.0.20.86 - - [27/Sep/2013:08:12:50 -0600] "GET /dist/server/32 HTTP/1
    +.0" 200 292 "-" "-"
    0.0.66.29 - - [27/Sep/2013:08:12:50 -0600] "POST /dist/unmanaged/33 HT
    +TP/1.0" 200 21 "-" "-"
    ...
    0.0.44.15 - - [27/Sep/2013:08:12:52 -0600] "GET /dist/server/34 HTTP/1
    +.0" 200 294 "-" "-"
    0.0.33.11 - - [27/Sep/2013:08:12:52 -0600] "GET /dist/server/38 HTTP/1
    +.0" 200 293 "-" "-"
    0.0.15.80 - - [27/Sep/2013:08:12:52 -0600] "GET /dist/server/33 HTTP/1
    +.0" 200 290 "-" "-"
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056003]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-07-26 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (176 votes), past polls