tests/testthat/test-oauth_signature.R

context("oauth_signature")


# Url normalisation -------------------------------------------------------

test_that("protocol is lower-cased", {
  expect_equal(oauth_normalise_url("HTTP://google.com"), "http://google.com/")
})

test_that("default ports are stripped", {
  expect_equal(oauth_normalise_url("http://google.com:80"), "http://google.com/")
  expect_equal(oauth_normalise_url("https://google.com:443"), "https://google.com/")
})

Try the httr package in your browser

Any scripts or data that you put into this service are public.

httr documentation built on Aug. 15, 2023, 9:08 a.m.