Streaming

com.alecdorrington.laminarcomponents.Streaming
object Streaming

Requests whose response is read line by line as it arrives.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Streaming.type

Members list

Type members

Classlikes

enum Event

An event of a streamed response.

An event of a streamed response.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def post(url: String, json: String): EventStream[Event]

Posts a JSON body when first followed, then emits each line of the response as it arrives, then Event.Done. Losing its last subscriber aborts the request. Cookies go with it to the page's own origin alone.

Posts a JSON body when first followed, then emits each line of the response as it arrives, then Event.Done. Losing its last subscriber aborts the request. Cookies go with it to the page's own origin alone.

Value parameters

json

The body, as JSON.

url

Where to post.

Attributes

Returns

The response's events.