Module

Ctl.Internal.Affjax

#request

request :: forall a. Request a -> Aff (Either Error (Response a))

Makes an HTTP request.

The example below performs a GET request to the URL /resource and interprets the response body as JSON.

import Affjax.ResponseFormat (json)
...
request (defaultRequest { url = "/resource", method = Left GET, responseFormat = json})

For common cases helper functions can often be used insteAX of request . For instance, the above example is equivalent to the following.

get json "/resource"

Modules