File tree 2 files changed +7
-2
lines changed
src/main/scala/org/scalajs/dom/ext
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ import scala.scalajs.js
9
9
import scala .scalajs .js .typedarray .ArrayBufferView
10
10
import scala .scalajs .js .typedarray .TypedArrayBufferOps ._
11
11
12
- /** Wraps an XMLHttpRequest to provide an easy one-line way of making an Ajax call, returning a Future. */
12
+ /** Wraps an XMLHttpRequest to provide an easy one-line way of making an Ajax call, returning a Future.
13
+ * @deprecated
14
+ * use the `dom.fetch` API instead
15
+ */
13
16
object Ajax {
14
17
15
18
/** Supported data formats for Ajax are implicitly converted to InputData */
Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ package org.scalajs.dom.ext
3
3
import org .scalajs .dom
4
4
5
5
/** Thrown when `Ajax.get` or `Ajax.post` receives a non-20X response code. Contains the XMLHttpRequest that resulted in
6
- * that response
6
+ * @deprecated
7
+ * use the `dom.fetch` API instead
7
8
*/
8
9
case class AjaxException (xhr : dom.XMLHttpRequest ) extends Exception {
9
10
def isTimeout : Boolean = xhr.status == 0 && xhr.readyState == 4
10
11
}
11
12
13
+ /** @deprecated use the `dom.fetch` API instead */
12
14
// This is just there to work around some weird warnings in Scala 3.x
13
15
object AjaxException extends (dom.XMLHttpRequest => AjaxException )
You can’t perform that action at this time.
0 commit comments