@@ -15,7 +15,10 @@ import scala.scalajs.js.typedarray.TypedArrayBufferOps._
1515 */
1616object Ajax {
1717
18- /** Supported data formats for Ajax are implicitly converted to InputData */
18+ /** Supported data formats for Ajax are implicitly converted to InputData
19+ * @deprecated
20+ * use the `dom.fetch` API instead
21+ */
1922 @ js.native
2023 sealed trait InputData extends js.Any
2124
@@ -45,31 +48,37 @@ object Ajax {
4548 }
4649 }
4750
51+ /** @deprecated use the `dom.fetch` API instead */
4852 def get (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
4953 withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
5054 apply(" GET" , url, data, timeout, headers, withCredentials, responseType)
5155 }
5256
57+ /** @deprecated use the `dom.fetch` API instead */
5358 def post (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
5459 withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
5560 apply(" POST" , url, data, timeout, headers, withCredentials, responseType)
5661 }
5762
63+ /** @deprecated use the `dom.fetch` API instead */
5864 def put (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
5965 withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
6066 apply(" PUT" , url, data, timeout, headers, withCredentials, responseType)
6167 }
6268
69+ /** @deprecated use the `dom.fetch` API instead */
6370 def patch (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
6471 withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
6572 apply(" PATCH" , url, data, timeout, headers, withCredentials, responseType)
6673 }
6774
75+ /** @deprecated use the `dom.fetch` API instead */
6876 def delete (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
6977 withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
7078 apply(" DELETE" , url, data, timeout, headers, withCredentials, responseType)
7179 }
7280
81+ /** @deprecated use the `dom.fetch` API instead */
7382 def apply (method : String , url : String , data : InputData , timeout : Int , headers : Map [String , String ],
7483 withCredentials : Boolean , responseType : String ): Future [dom.XMLHttpRequest ] = {
7584 val req = new dom.XMLHttpRequest ()
0 commit comments