@@ -140,6 +140,24 @@ delete u = affjax $ defaultRequest { method = Left DELETE, url = u }
140
140
delete_ :: forall e . URL -> Affjax e Unit
141
141
delete_ = delete
142
142
143
+ -- | Makes a `PATCH` request to the specified URL, sending data.
144
+ patch :: forall e a b . (Requestable a , Respondable b ) => URL -> a -> Affjax e b
145
+ patch u c = affjax $ defaultRequest { method = Left PATCH , url = u, content = Just c }
146
+
147
+ -- | Makes a `PATCH` request to the specified URL with the option to send data.
148
+ patch' :: forall e a b . (Requestable a , Respondable b ) => URL -> Maybe a -> Affjax e b
149
+ patch' u c = affjax $ defaultRequest { method = Left PATCH , url = u, content = c }
150
+
151
+ -- | Makes a `PATCH` request to the specified URL, sending data and ignoring the
152
+ -- | response.
153
+ patch_ :: forall e a . (Requestable a ) => URL -> a -> Affjax e Unit
154
+ patch_ = patch
155
+
156
+ -- | Makes a `PATCH` request to the specified URL with the option to send data,
157
+ -- | and ignores the response.
158
+ patch_' :: forall e a . (Requestable a ) => URL -> Maybe a -> Affjax e Unit
159
+ patch_' = patch'
160
+
143
161
-- | A sequence of retry delays, in milliseconds.
144
162
type RetryDelayCurve = Int -> Int
145
163
@@ -292,4 +310,3 @@ foreign import _cancelAjax
292
310
(Error -> Eff (ajax :: AJAX | e ) Unit )
293
311
(Boolean -> Eff (ajax :: AJAX | e ) Unit )
294
312
(Eff (ajax :: AJAX | e ) Unit )
295
-
0 commit comments