Module

Node.URL

This module defines bindings to the Node URL and Query String APIs.

#Query

data Query

A query object is a JavaScript object whose values are strings or arrays of strings.

It is intended that the user coerce values of this type to/from some trusted representation via e.g. Data.Foreign or Unsafe.Coerce..

#URL

type URL = { auth :: Nullable String, hash :: Nullable String, host :: Nullable String, hostname :: Nullable String, path :: Nullable String, pathname :: Nullable String, port :: Nullable String, protocol :: Nullable String, query :: Nullable String, search :: Nullable String, slashes :: Nullable Boolean }

A URL object.

All fields are nullable, and will be missing if the URL string passed to parse did not contain the appropriate URL part.

#parse

parse :: String -> URL

Parse a URL string into a URL object.

#format

format :: URL -> String

Format a URL object as a URL string.

#resolve

resolve :: String -> String -> String

Resolve a URL relative to some base URL.

#parseQueryString

parseQueryString :: String -> Query

Convert a query string to an object.

#toQueryString

toQueryString :: Query -> String

Convert a query string to an object.

Modules