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

Path for URI #13

Open
MasseGuillaume opened this issue Sep 4, 2015 · 2 comments
Open

Path for URI #13

MasseGuillaume opened this issue Sep 4, 2015 · 2 comments

Comments

@MasseGuillaume
Copy link

I want to use pathy for the path part in the URI.
currently I only have access to

def currentDir[S]: Path[Rel, Dir, S] = Current
def rootDir[S]: Path[Abs, Dir, S] = Root

something like:

def current[T, S]: Path[Rel, T, S] = Current
def root[T, S]: Path[Abs, T, S] = Root

would be useful.

@sellout
Copy link
Contributor

sellout commented Sep 4, 2015

I don’t understand – Current and Root always need to be directories. What does the second version buy you?

@MasseGuillaume
Copy link
Author

Uri has a notion of Path and it's not really bound to Directories or Files:
https://tools.ietf.org/html/rfc3986#section-3.3

In http4s Path is not really well typed:
https://github.com/http4s/http4s/blob/14d9f28babc5a4205132fd2e7fbab161125e3469/core/src/main/scala/org/http4s/Uri.scala#L141

@MasseGuillaume MasseGuillaume changed the title expose Root & Current Path for URI Sep 4, 2015
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