Repository navigation
Added
@arijs/frontend/universal/loaders/ajax: one import that resolves to the browser
loader (browsercondition, and by default) or to the Node loader (node), so
code that renders on both sides makes a single call. Browser builds no longer
resolvehttp/https.server/loaders/ajax-netacceptsurl(alias ofreq), and exportsparseResponse.AjaxError,formatErrorand the response pipeline are shared by both loaders
(isomorphic/loaders/ajax-common): errors from either side pass the sameinstanceof.
Fixed
server/loaders/ajax-netignoredmethodandheaders: a POST with a stringreq
went out as a GET with no headers. Both are applied now; headers may be a
{ name, value }list (as in the browser loader) or a plain object.server/loaders/ajax-netalways usedhttps; the protocol now comes from the URL
(apiProtocolstill forces it).server/loaders/ajax-netresolvedloadAjaxPromisewhenvalidatefailed, the
Content-Type did not matchtypeExpect, or the body did not parse. It now rejects,
as the browser loader does.server/loaders/ajax-netsendsContent-Lengthfor string/Buffer bodies instead of
chunked encoding.asBuffer: truethrew on every chunk.- A finished request no longer leaves its timeout armed.
Build
- Babel 8.1, and dev dependencies with no open audit alerts. The compiled
lib/is unchanged.
Calls that pass req keep working. On the server, requests whose validate, type
check or parsing fails now reject instead of resolving.