Skip to content
Browse files

[enhance] stdlib/uri: Adding of_relative & default_relative.

  • Loading branch information...
1 parent d7a4ca7 commit 7bc61f37f713aae58af1d4de28322d4683350f2d @akoprow akoprow committed Jun 3, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 stdlib/core/web/core/uri.opa
View
6 stdlib/core/web/core/uri.opa
@@ -291,8 +291,14 @@ Uri =
of_absolute(absolute: Uri.absolute): Uri.uri =
@opensums(absolute)
+ of_relative(relative: Uri.relative): Uri.uri =
+ @opensums(relative)
+
default_absolute: Uri.absolute = {schema = {none} credentials = {username = {none} password = {none}} domain="example.org" port = {none} path=[] query=[] fragment = {none} is_directory=true}
+ default_relative: Uri.relative =
+ { path=[] fragment=none query=[] is_directory=false is_from_root=true }
+
default_absolute_domain(domain,path) =
{default_absolute
with ~domain ~path}

0 comments on commit 7bc61f3

Please sign in to comment.
Something went wrong with that request. Please try again.