Module

Node.URL

Package
purescript-node-url
Repository
purescript-node/purescript-node-url

#URL Source

data URL

Instances

#setHostname Source

#origin Source

#setPassword Source

#setPathname Source

#setProtocol Source

#setUsername Source

#fileURLToPath' Source

#UrlFormatOptions Source

type UrlFormatOptions :: Row Typetype UrlFormatOptions = (auth :: Boolean, fragment :: Boolean, search :: Boolean, unicode :: Boolean)
  • auth <boolean> true if the serialized URL string should include the username and password, false otherwise. Default: true.
  • fragment <boolean> true if the serialized URL string should include the fragment, false otherwise. Default: true.
  • search <boolean> true if the serialized URL string should include the search query, false otherwise. Default: true.
  • unicode <boolean> true if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to being Punycode encoded. Default: false.

#format' Source

format' :: forall r trash. Union r trash UrlFormatOptions => URL -> Record r -> Effect String

#HttpOptions Source

type HttpOptions = { auth :: String, hash :: String, hostname :: String, href :: String, path :: String, pathname :: String, port :: Int, protocol :: String, search :: String }
  • protocol <string> Protocol to use.
  • hostname <string> A domain name or IP address of the server to issue the request to.
  • hash <string> The fragment portion of the URL.
  • search <string> The serialized query portion of the URL.
  • pathname <string> The path portion of the URL.
  • path <string> Request path. Should include query string if any. E.G. '/index.html?page=12'. An exception is thrown when the request path contains illegal characters. Currently, only spaces are rejected but that may change in the future.
  • href <string> The serialized URL.
  • port <number> Port of remote server.
  • auth <string> Basic authentication i.e. 'user:password' to compute an Authorization header.