@karansehgal1988,
There are a variety of methods for hosting Plumber APIs externally. These can be found in the hosting section of the Plumber documentation.
One of the simplest methods for deploying Plumber APIs is RStudio Connect. This is a commercial solution that provides easy, push-button deployment of Plumber APIs along with additional security and scalability features.
I'm not sure if I understand your question about posting the data to the API. Are you looking for how to create an API request containing the data? This depends on the tool you're using to make the request. The following example shows how you could use R to make a request to a Plumber API and include data for a prediction:
httr::POST(url = "<url-to-api>", body = data, encode = "json")
Where data
is the data you want to send to the API for prediction.
If you're looking for an interactive tool for sending requests to APIs, you may want to take a look at Postman, which provides a GUI for working with APIs.