Skip to content

is_url function does not recognise urls with localhost #47

@fruchtblase

Description

@fruchtblase

Hello everyone,

thanks for the great package! I stumbled into a little bug (or desired behavior that isn't documented): if you specifiy an url with localhost, you will get an error.

Maybe the regex in the is_url function needs to be refitted? This comparison of url regexes might help https://mathiasbynens.be/demo/url-regex

Cheers!

library(httr)
library(polite)

polite_POST <- politely(httr::POST, verbose=TRUE) 
polite_POST(url = "http://localhost:3001/api/v1/document")

Error: I can't find an argument containing url. Aborting.

polite_0.1.2
httr_1.4.5
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions