A tiny Fetch API wrapper that allows you to make http requests without need to handle to send the CSRF Token on every request
MIT License
Bot releases are hidden (Show)
Full Changelog: https://github.com/rails/request.js/compare/v0.0.8...v0.0.9
Published by marcelolx almost 2 years ago
Fixes the v0.0.7 release which was missing the dist esm file
Published by marcelolx almost 2 years ago
Full Changelog: https://github.com/rails/request.js/compare/v0.0.6...v0.0.7
Published by marcelolx almost 3 years ago
New: Function to check if the response status is unprocessableEntity
https://github.com/rails/request.js/pull/31 @olimart
New: Added support for URL Objects https://github.com/rails/request.js/pull/39 @excid3
New: Accept application/vnd.api+json
response content type when responseKind: 'json'
is provided https://github.com/rails/request.js/pull/41 @MatthewKennedy
Fixed: Remove anchor from the URL when making a request https://github.com/rails/request.js/pull/34 @KonoMaxi
Fixed: Await turbo stream insertion in DOM https://github.com/rails/request.js/pull/36 @excid3
Docs: Add simple example for hooks https://github.com/rails/request.js/pull/40 @rainerborene
A huge thank you to @KonoMaxi that also added a test suite to Request.JS! https://github.com/rails/request.js/pull/33
Published by marcelolx about 3 years ago
New: Allow redirect value to be configurable (https://github.com/rails/request.js/pull/25)
New: Append query params to url if provided (https://github.com/rails/request.js/pull/28)
New: Make query
to accept a FormData and URLSearchParams (https://github.com/rails/request.js/pull/27)
Published by marcelolx over 3 years ago
New: Cache text and json after reading (#21)
New: Expose response.redirected
to FetchResponse (#22)
New: Add support to stringify automatically the body of the request if the type of it isn't a string (#24)
Published by marcelolx over 3 years ago
Changed: Changed the name of the Request and Response classes to FetchRequest
/FetchResponse
(https://github.com/rails/request.js/pull/8)
Docs: Note about issue with Turbolinks (https://github.com/rails/request.js/pull/12)
Fixed: Uppercase method name (https://github.com/rails/request.js/pull/5)
New: Automatically process Turbo Stream responses (https://github.com/rails/request.js/pull/6)
New: Allow additional/custom headers in request (https://github.com/rails/request.js/pull/7)
New: Adds shorthand functions for request verbs get
, post
, put
, patch
, destroy
(https://github.com/rails/request.js/pull/10)
New: Add request interceptor (https://github.com/rails/request.js/pull/13)
Published by marcelolx over 3 years ago