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

#Query Source

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 Source

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 Source

parse :: String -> URL

Parse a URL string into a URL object.

#format Source

format :: URL -> String

Format a URL object as a URL string.

#resolve Source

resolve :: String -> String -> String

Resolve a URL relative to some base URL.

#parseQueryString Source

parseQueryString :: String -> Query

Convert a query string to an object.

#toQueryString Source

toQueryString :: Query -> String

Convert a query string to an object.