in reply to Good REST API Tutorial for Perl.

What I understand as of now, is that REST API is something like a call I make to a website and give me the results in the json format, that's all.

Not quite. Firstly, there is no requirement for REST to use JSON although many instances do. Secondly, REST is more specific in that it stipulates the creation, deletion and modification of data items via a structured path. The HTTP methods are respected as are HTTP status codes - REST therefore necessarily builds on HTTP. There is plenty of detailed documentation on the web about what REST is and what it isn't (eg

If you could direct me to a good tutorial that teaches REST API using Perl, I will be ever so thankful.

Do you want to build a client or a server?


Replies are listed 'Best First'.
Re^2: Good REST API Tutorial for Perl.
by netizen (Novice) on Oct 30, 2020 at 00:25 UTC

    Hi Hippo,

    Thanks for the clarity. In my case, the Server is already there. Its device that has REST APIs available. I need to build something that will "connect" to it and get the output.

      REST::Client will get you started.

      There are many more clients for specialized REST services - if you are using a well-known REST server, you will be better off using a pre-written specialized client.

      Here is a brief Rest::Client tutorial.

                      "Imaginary friends are a sign of a mental disorder if they cause distress, including antisocial behavior. Religion frequently meets that description"

        I recommend HTTP::Tiny. A client need not be over complicated and it's a good exercise for someone learning the nuances of interfacing with a RESTful API.