Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Url encoding paths #4

Open
bjstubbs opened this issue Feb 4, 2019 · 1 comment
Open

Url encoding paths #4

bjstubbs opened this issue Feb 4, 2019 · 1 comment

Comments

@bjstubbs
Copy link
Contributor

bjstubbs commented Feb 4, 2019

Do we want to auto-encode paths/char inputs to the apis?

example:

library(AnVIL)
library(httr)
library(jsonlite)

mypath="github.com/vjcitn/vardemo/AnnotatingWGSVariantsWithBioc"
mypath
[1] "github.com/vjcitn/vardemo/AnnotatingWGSVariantsWithBioc"

#this fails because of the "/"'s
fromJSON(content(dockstore$getPublishedWorkflowByPath(mypath),"text"))
$code
[1] 404

$message
[1] "HTTP 404 Not Found"

mypath2=URLencode(mypath,reserve=TRUE)
mypath2
[1] "github.com%2Fvjcitn%2Fvardemo%2FAnnotatingWGSVariantsWithBioc"
fromJSON(content(dockstore$getPublishedWorkflowByPath(mypath2),"text"))
$aliases
NULL

$author
[1] ""

$checker_id
NULL

$dbCreateDate
[1] 1.549286e+12

$dbUpdateDate
[1] 1.549296e+12

$defaultTestParameterFilePath
NULL

$defaultVersion
NULL

$description
NULL

$descriptorType
[1] "wdl"

$email
[1] ""

$full_workflow_path
[1] "github.com/vjcitn/vardemo/AnnotatingWGSVariantsWithBioc"

@mtmorgan
Copy link
Collaborator

This is a good idea but I don't know how to implement this cleanly / generally. Is it helpful (or only confusing?) to provide an encode() function to wrap URLencode(reserved=TRUE) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants