Using Curl to make REST API requests

'An application program interface (API) is a set of definitions and protocols that allows software programs to communicate with each other. The term REST stands for representational state transfer. It is an architectural style that consists of a set of constraints to be used when creating web services. RESTful API is an API that follows the REST architecture. Typically REST APIs use the HTTP protocol for sending and retrieving data and JSON formatted responses. You can use the standard HTTP methods to create, view, update, or delete resources through the API. To test and interact with the RESTful APIs, you can use any library or tool that can make HTTP requests. API requests are made up of four different parts: - The endpoint. This is the URL that the client uses to communicate with the server. - The HTTP method. It tells the server what action the client wants to perform. The most common methods are GET POST PUT DELETE and PATCH - The headers. Used to pass additional information between the server and the client, such as authorization. - The body. The data sent to the server. In this article, we’re going to discuss how to use curl to interact with RESTful APIs. curl is a command-line utility for transferring data from or to a remote server. It is installed by default on macOS and most Linux distributions.' -- source: https://linuxize.com/post/curl-rest-api/ Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 http://www.cms.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/
participants (1)
-
Peter Reutemann