This package implements an optimized HTTP client that is used for all requests made through Unpoly.
The HTTP client offers many quality-of-life improvements, for example:
X-Up-Target
header. The server may choose to only render the targeted fragment.up:request:loaded
or up:network:late
are emitted throughout the request/response lifecycle.Unpoly's HTTP client is used automatically when rendering, e.g. when following a link
or submitting a form. To use the client from your own JavaScripts, use up.request()
.
Makes an AJAX request to the given URL.
This event is emitted when AJAX requests are taking long to finish loading.
Makes an AJAX request to the given URL and caches the response.
Makes the cache assume that newRequest
has the same response as the
already cached oldRequest
.
Expires cache entries.
Evicts responses in the cache.
Expires entries in the cache.
Returns a cached request matching the given request options.
Aborts pending requests matching a condition.
Sets default options for this package.
Returns whether Unpoly is currently loading a request.
Returns whether Unpoly is not currently loading a request.
This event is emitted when AJAX requests are taking long to finish loading.
Makes a full-page request, replacing the entire browser environment with a new page from the server response.
This event is emitted when AJAX requests have taken long to finish, but have finished now.
Expires all cache entries.
Preloads the given link.
Makes an AJAX request to the given URL.
This event is emitted when an AJAX request was aborted.
This event is emitted before an AJAX request is sent over the network.
This event is emitted when the response to an AJAX request has been received.
This event is emitted when an AJAX request encounters fatal error like a timeout or loss of network connectivity.