Shorten a URL using the Short.io API
short_url.Rdshort_url sends a POST request to the
Short.io API to create a new shortened
URL for the provided uri. The function
uses environment variable SHORTIO
for the API key and sets specific options
for the API call, such as not
allowing duplicate links and setting a
fixed domain for the shortened URL.
Details
This function takes a given URL and leverages the Short.io API to generate a shortened version of the URL using the specified custom domain.
Examples
if (FALSE) { # \dontrun{
# Example usage to shorten a URL
Sys.setenv(SHORTIO = "your_api_key_here") # Set API key in environment
short_url("https://www.example.com/very-long-url")
} # }