How do I use and call REST API

How do I call Rest API. Example, contact form. I have rest api to execute http post rest api to send data to database and save.
Another API to read data through rest api get method, want to display the data. The output I receive is in json format through rest api

The easiest way is to using the Fetch API

Thank you. It worked.