Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Web Services

by derby (Abbot)
on Jun 19, 2013 at 16:27 UTC ( [id://1039801]=note: print w/replies, xml ) Need Help??


in reply to Web Services

Bad? That really depends on your perspective. Let's say it's not production ready. There are two camps for web services -- SOAP and REST. SOAP has a huge learning curve while REST (IMHO) is a bit more accessible for beginners. Given your script above and the principles of REST, I would say you should

  • use path info for resource access (/id instead of lookup=id)
  • use HTTP headers to pass auth tokens
  • use HTTP methods to drive what to do with the resource (GET, POST, PUT, DELETE)
  • set the content type to application/json if your sending back json
That should give you enough to chew on for a while.

-derby

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2024-04-16 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found