You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Affjax.purs
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
moduleAffjax
2
-
( RequestOptions, defaultRequest
2
+
( Request, defaultRequest
3
3
, Response
4
4
, URL
5
5
, request
@@ -52,7 +52,7 @@ import Math as Math
52
52
-- | A record that contains all the information to perform an HTTP request.
53
53
-- | Instead of constructing the record from scratch it is often easier to build
54
54
-- | one based on `defaultRequest`.
55
-
typeRequestOptions=
55
+
typeRequest=
56
56
{method::EitherMethodCustomMethod
57
57
, url::URL
58
58
, headers::ArrayRequestHeader
@@ -62,18 +62,18 @@ type RequestOptions =
62
62
, withCredentials::Boolean
63
63
}
64
64
65
-
-- | A record of the type `RequestOptions` that has all fields set to default
65
+
-- | A record of the type `Request` that has all fields set to default
66
66
-- | values. This record can be used as the foundation for constructing
67
67
-- | custom requests.
68
68
-- |
69
-
-- | As an example
69
+
-- | As an example:
70
70
-- |
71
71
-- | ```purescript
72
72
-- | defaultRequest { url = "/api/user", method = Left POST }
73
73
-- | ```
74
74
-- |
75
-
-- | Represents a POST request to the URL `/api/user`.
76
-
defaultRequest::RequestOptions
75
+
-- | Would represents a POST request to the URL `/api/user`.
76
+
defaultRequest::Request
77
77
defaultRequest =
78
78
{ method: LeftGET
79
79
, url: "/"
@@ -183,7 +183,7 @@ defaultRetryPolicy =
183
183
typeRetryStateea=Either (Eitherea) a
184
184
185
185
-- | Retry a request using a `RetryPolicy`. After the timeout, the last received response is returned; if it was not possible to communicate with the server due to an error, then this is bubbled up.
0 commit comments