Learn R Programming

fireproof (version 0.1.0)

get_path: Extract the path from a URL

Description

This function is a simple helper that extract the path part of a URL. It is useful when constructing OAuth 2.0 derived authenticators for the redirect_path argument.

Usage

get_path(url, root = NULL)

Value

The "path" part of the URL

Arguments

url

The url to extract the path from

root

An optional root to remove from the path as well

Examples

Run this code
get_path("https://example.com/auth")

get_path("https://example.com/api/auth", root = "/api")

Run the code above in your browser using DataLab