jQuery.xhr will be an asynchronous HTTP request API returning standards-compliant thenables. We have identified two possible approaches:
- Autosend: control by
optionsparameter; advanced functionality viabeforeSend(similar tojQuery.ajax) - Chainable: control by
optionsand/or chainable setters; advanced functionality viasend: falseand a chainablesendmethod
This gist compares the approaches by imagining their use for current jQuery.ajax examples. To better highlight differences, chaining methods will be used instead of options more heavily than is likely in actual practice (assuming that options is available in the "Chainable" solution).