@@ -140,6 +140,24 @@ delete u = affjax $ defaultRequest { method = Left DELETE, url = u }
140140delete_ :: forall e . URL -> Affjax e Unit
141141delete_ = delete
142142
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+
143161-- | A sequence of retry delays, in milliseconds.
144162type RetryDelayCurve = Int -> Int
145163
@@ -292,4 +310,3 @@ foreign import _cancelAjax
292310 (Error -> Eff (ajax :: AJAX | e ) Unit )
293311 (Boolean -> Eff (ajax :: AJAX | e ) Unit )
294312 (Eff (ajax :: AJAX | e ) Unit )
295-
0 commit comments