Create an API
Create an API with Barktler is very simple. This document will help you get to know about creating a simple API with Barktler.
Make sure the Barktler package is installed.
For install, run the following command under your project folder to install the required dependencies.
bash <(curl -s https://barktler.com/quick-start/create-an-api/install-core.sh)
Let’s write a simple API with allow us to get the webpage of Google search result.
Google provides a simple URL for searching. For example, the URL of the search keyword
hello will be:
TypeScript code for the described API will look like this.
And that’s it, your API is ready, and the various features of that class is ready to ship!
Timeout is supported by Barktler, see Timeout for more details.
API created by Barktler is multi-dimension configurable, see Runtime Config.
See Execute API for how to use your created API.