AjaxStream

com.raquo.airstream.web.AjaxStream
See theAjaxStream companion class
object AjaxStream

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
AjaxStream.type

Members list

Type members

Classlikes

final case class AjaxAbort(xhr: XMLHttpRequest) extends AjaxStreamError

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class AjaxNetworkError(xhr: XMLHttpRequest, message: String) extends AjaxStreamError

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class AjaxStatusError(xhr: XMLHttpRequest, status: Int, message: String) extends AjaxStreamError

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
sealed abstract class AjaxStreamError(val xhr: XMLHttpRequest, message: String) extends Exception

A more detailed version of dom.ext.AjaxException (no relation)

A more detailed version of dom.ext.AjaxException (no relation)

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
final case class AjaxTimeout(xhr: XMLHttpRequest) extends AjaxStreamError

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Types

type InputData = String | ArrayBufferView | Blob | FormData

Value members

Concrete methods

def defaultIsStatusCodeSuccess(status: Int): Boolean
def delete(url: String, data: InputData, timeoutMs: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String, isStatusCodeSuccess: Int => Boolean, requestObserver: Observer[XMLHttpRequest], progressObserver: Observer[(XMLHttpRequest, ProgressEvent)], uploadProgressObserver: Observer[(XMLHttpRequest, ProgressEvent)], readyStateChangeObserver: Observer[XMLHttpRequest]): AjaxStream

Returns an EventStream that performs an HTTP DELETE request.

Returns an EventStream that performs an HTTP DELETE request.

Attributes

See also
def get(url: String, data: InputData, timeoutMs: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String, isStatusCodeSuccess: Int => Boolean, requestObserver: Observer[XMLHttpRequest], progressObserver: Observer[(XMLHttpRequest, ProgressEvent)], uploadProgressObserver: Observer[(XMLHttpRequest, ProgressEvent)], readyStateChangeObserver: Observer[XMLHttpRequest]): AjaxStream

Returns an EventStream that performs an HTTP GET request.

Returns an EventStream that performs an HTTP GET request.

Attributes

See also
def initRequest(timeoutMs: Int, withCredentials: Boolean, responseType: String): XMLHttpRequest

Initializes and configures the XmlHttpRequest. This does not cause any network activity.

Initializes and configures the XmlHttpRequest. This does not cause any network activity.

Note: after initializing the request, you need to openRequest(), and then sendRequest()

AjaxEventStream already does this internally. This is provided as a building block for custom logic.

Attributes

def patch(url: String, data: InputData, timeoutMs: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String, isStatusCodeSuccess: Int => Boolean, requestObserver: Observer[XMLHttpRequest], progressObserver: Observer[(XMLHttpRequest, ProgressEvent)], uploadProgressObserver: Observer[(XMLHttpRequest, ProgressEvent)], readyStateChangeObserver: Observer[XMLHttpRequest]): AjaxStream

Returns an EventStream that performs an HTTP PATCH request.

Returns an EventStream that performs an HTTP PATCH request.

Attributes

See also
def post(url: String, data: InputData, timeoutMs: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String, isStatusCodeSuccess: Int => Boolean, requestObserver: Observer[XMLHttpRequest], progressObserver: Observer[(XMLHttpRequest, ProgressEvent)], uploadProgressObserver: Observer[(XMLHttpRequest, ProgressEvent)], readyStateChangeObserver: Observer[XMLHttpRequest]): AjaxStream

Returns an EventStream that performs an HTTP POST request.

Returns an EventStream that performs an HTTP POST request.

Attributes

See also
def put(url: String, data: InputData, timeoutMs: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String, isStatusCodeSuccess: Int => Boolean, requestObserver: Observer[XMLHttpRequest], progressObserver: Observer[(XMLHttpRequest, ProgressEvent)], uploadProgressObserver: Observer[(XMLHttpRequest, ProgressEvent)], readyStateChangeObserver: Observer[XMLHttpRequest]): AjaxStream

Returns an EventStream that performs an HTTP PUT request.

Returns an EventStream that performs an HTTP PUT request.

Attributes

See also
def sendRequest(request: XMLHttpRequest, method: String, url: String, data: InputData, headers: Map[String, String]): Unit

The request should be initialized and configured with all the callbacks by this point.

The request should be initialized and configured with all the callbacks by this point.

AjaxEventStream already does this internally. This is provided as a building block for custom logic.

Attributes