| Title: | Parse Urls |
|---|---|
| Description: | What the package does (one paragraph). |
| Authors: | Dyfan Jones [aut, cre] |
| Maintainer: | Dyfan Jones <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9000 |
| Built: | 2026-05-06 08:55:44 UTC |
| Source: | https://github.com/DyfanJones/weburl |
Get URL elements
get_scheme(url) get_host(url) get_port(url) get_query(url) get_path(url) get_fragment(url) get_username(url) get_password(url)get_scheme(url) get_host(url) get_port(url) get_query(url) get_path(url) get_fragment(url) get_username(url) get_password(url)
url |
character vector of urls |
a vector of characters
library(weburl) url <- "https://user:[email protected]:1234/foo/bar?baz#quux" get_scheme(url) get_host(url) get_port(url) get_path(url) get_query(url) get_fragment(url) get_username(url) get_password(url)library(weburl) url <- "https://user:[email protected]:1234/foo/bar?baz#quux" get_scheme(url) get_host(url) get_port(url) get_path(url) get_query(url) get_fragment(url) get_username(url) get_password(url)
Set URL elements
set_scheme(url, scheme) set_host(url, host) set_port(url, port) set_path(url, path) set_query(url, query) set_fragment(url, fragment) set_username(url, username) set_password(url, password)set_scheme(url, scheme) set_host(url, host) set_port(url, port) set_path(url, path) set_query(url, query) set_fragment(url, fragment) set_username(url, username) set_password(url, password)
url |
character vector of urls |
scheme |
character |
host |
character |
port |
integer |
path |
character vector |
query |
named list |
fragment |
character |
username |
character |
password |
character |
a vector of characters
library(weburl) url <- "https://example.com" set_scheme(url, "http") set_host(url, "dummy.com") set_port(url, 1234) set_path(url, c("foo", "bar")) set_query(url, list("baz" = "zar")) set_fragment(url, "quux") set_username(url, "user") set_password(url, "pass")library(weburl) url <- "https://example.com" set_scheme(url, "http") set_host(url, "dummy.com") set_port(url, 1234) set_path(url, c("foo", "bar")) set_query(url, list("baz" = "zar")) set_fragment(url, "quux") set_username(url, "user") set_password(url, "pass")
Encode Url
url_encode(url)url_encode(url)
url |
character vector of urls |
a vector of characters
library(weburl) url <- "https:www.google.com/dummy=path yo" url_encode(url)library(weburl) url <- "https:www.google.com/dummy=path yo" url_encode(url)
Parse url
url_parse(url)url_parse(url)
url |
character vector of urls |
a data.frame consisting of the columns scheme, host, port, path, query and fragment.
library(weburl) url <- "https://user:[email protected]:1234/foo/bar?baz#quux" url_parse(url)library(weburl) url <- "https://user:[email protected]:1234/foo/bar?baz#quux" url_parse(url)