The library documents itself · Web & app server
stzHttpSandbox
23 own methods · 4 forms written with extensions, listed under their method
the source: base/service/stzHttpPort.ring(opens in a new tab) · All classes · The area reference: Web & app server
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
No method of this class is run on this page: the class reaches files, the network, processes, the clock, chance or sound, and an example run here would only be an example of its effects. Each method carries the explanation the library gives of itself.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
IsSandbox
a double declares itself -- see stzServiceRegistryno extension
Script
The pattern language is three cases and no more (the same restraint stzXml's paths take -- a half-regex invites people to expect the rest): "https://api/x" exact "https://api/*" prefix, up to the star "*/rates*" contains, when it starts AND ends with a starQCSXTZZZIBWU
ScriptJsonQ
JSON is what most of these APIs speak.no extension
ScriptFailureQ
make the service fail on demand -- the thing a real vendor will not do for youno extension
NumberOfScripts
(no comment in the source: the name reads as a sentence) number of scriptsno extension
SeedResponse
REPLAY mode ------------------------------------------------------ Keep a response for an exact (method, url, body). The key is a hash of all three, so a different body is a different recording -- which is what makes this safe for POSTs.QCSXTZZZIBWU
RecordFrom
Call a LIVE client once and keep what it said. The client is any object with Request(method, url, body) -- so the recording path is testable without a network, by handing in any conforming stand-in.no extension
NumberOfRecordings
(no comment in the source: the name reads as a sentence) number of recordingsno extension
HasRecording
(no comment in the source: the name reads as a sentence) has recordingno extension
RequestKey
the key a recording is filed under -- exposed because seeing it makes the replay model obvious (and because a fixture may want to name one).no extension
Request
the PORT contract ------------------------------------------------ -> [ :status, :body, :from ] where :from is :replay, :scripted or :miss. A RECORDING wins over a script: a recording is what the real service actually said, and that is more authoritative than a rule someone wrote.no extension
GetFrom
NOTE: not Get/Post -- `Get` is a Haro keyword (which is why stzAppServer has Get_). These read better than an underscore anyway.no extension
PostTo
(no comment in the source: the name reads as a sentence) post tono extension
SetStrict
strictnessQCSXTZZZIBWU
IsStrict
(no comment in the source: the name reads as a sentence) is strictno extension
Calls
the journal (what the code TRIED)no extension
NumberOfCalls
(no comment in the source: the name reads as a sentence) number of callsno extension
LastCall
(no comment in the source: the name reads as a sentence) last callno extension
NumberOfCallsTo
how many times a URL was asked for -- the assertion that catches an N+1 or a retry storm.no extension
WasCalled
(no comment in the source: the name reads as a sentence) was calledno extension
ClearCalls
(no comment in the source: the name reads as a sentence) clear callsQCSXTZZZIBWU
Show
(no comment in the source: the name reads as a sentence) showno extension

