Skip to content

Commit ac88039

Browse files
committed
Deprecate the ext.Ajax extension.
Recommend to use `dom.fetch` instead, whose API is basically just as good as `Ajax` was.
1 parent 413f006 commit ac88039

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/scala/org/scalajs/dom/ext/Extensions.scala

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import org.scalajs.dom.{Blob, FormData}
1616
* Thrown when `Ajax.get` or `Ajax.post` receives a non-20X response code.
1717
* Contains the XMLHttpRequest that resulted in that response
1818
*/
19+
@deprecated("use the dom.fetch API instead", "2.0.0")
1920
case class AjaxException(xhr: dom.XMLHttpRequest) extends Exception {
2021
def isTimeout = xhr.status == 0 && xhr.readyState == 4
2122
}
@@ -24,6 +25,7 @@ case class AjaxException(xhr: dom.XMLHttpRequest) extends Exception {
2425
* Wraps an XMLHttpRequest to provide an easy one-line way of making
2526
* an Ajax call, returning a Future.
2627
*/
28+
@deprecated("use the dom.fetch API instead", "2.0.0")
2729
object Ajax {
2830

2931
/**

0 commit comments

Comments
 (0)