classafBedSheet::BedClient

sys::Obj
  afBedSheet::BedClient

For testing BedSheet apps: Make (fake) HTTP calls against BedServer. Unlike WebClient, BedClient is designed for re-use, it auto tracks your Cookies and lets you inspect your session.

@since 1.0.4

cookies

Source

Str:Cookie cookies := Utils.makeMap(Str#, Cookie#)

The cookies currently amassed by this client. Currently they are not cleared / deleted when max-age runs out.

get

Source

BedClientRes get(Uri uri, Str method := "GET")

Makes a (fake) http request against the BedServer and returns the response.

headers

Source

Str:Str headers := Utils.makeMap(Str#, Str#)

The http headers to be sent on the next request. These are cleared after each request.

make

Source

new make(BedServer bedServer)

Create a BedClient attached to the given BedServer

session

Source

WebSession? session := BedSession.<ctor>() { private set }

The session used by the client. Returns null if it has not yet been created.

shutdown

Source

Void shutdown()

Shuts down the associated BedServer

version

Source

Version version := Version.<ctor>("1.1")

The HTTP version this client should announce to the server. Defaults to HTTP 1.1