@@ -15,7 +15,10 @@ import scala.scalajs.js.typedarray.TypedArrayBufferOps._
15
15
*/
16
16
object Ajax {
17
17
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
+ */
19
22
@ js.native
20
23
sealed trait InputData extends js.Any
21
24
@@ -45,31 +48,37 @@ object Ajax {
45
48
}
46
49
}
47
50
51
+ /** @deprecated use the `dom.fetch` API instead */
48
52
def get (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
49
53
withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
50
54
apply(" GET" , url, data, timeout, headers, withCredentials, responseType)
51
55
}
52
56
57
+ /** @deprecated use the `dom.fetch` API instead */
53
58
def post (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
54
59
withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
55
60
apply(" POST" , url, data, timeout, headers, withCredentials, responseType)
56
61
}
57
62
63
+ /** @deprecated use the `dom.fetch` API instead */
58
64
def put (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
59
65
withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
60
66
apply(" PUT" , url, data, timeout, headers, withCredentials, responseType)
61
67
}
62
68
69
+ /** @deprecated use the `dom.fetch` API instead */
63
70
def patch (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
64
71
withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
65
72
apply(" PATCH" , url, data, timeout, headers, withCredentials, responseType)
66
73
}
67
74
75
+ /** @deprecated use the `dom.fetch` API instead */
68
76
def delete (url : String , data : InputData = null , timeout : Int = 0 , headers : Map [String , String ] = Map .empty,
69
77
withCredentials : Boolean = false , responseType : String = " " ): Future [dom.XMLHttpRequest ] = {
70
78
apply(" DELETE" , url, data, timeout, headers, withCredentials, responseType)
71
79
}
72
80
81
+ /** @deprecated use the `dom.fetch` API instead */
73
82
def apply (method : String , url : String , data : InputData , timeout : Int , headers : Map [String , String ],
74
83
withCredentials : Boolean , responseType : String ): Future [dom.XMLHttpRequest ] = {
75
84
val req = new dom.XMLHttpRequest ()
0 commit comments