You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could hook to the htmx:beforeSend event and override the value of event.detail.xhr.responseType
If you only need to do that for certain requests, you could also check if event.detail.requestConfig.headers contains a Accept header set to application/json for example.
You could then implement a custom extension to automatically do that for certain elements, or roll your own logic as to when to set the response type to JSON or not.
Is there a way to get a pre-parsed JSON response in the after-request handler? I assume it's simply not setting responseType="json" in the XHR.
Thanks
The text was updated successfully, but these errors were encountered: