HTTP Requests with Re-frame
Overview
Basic API Requests
(rf/dispatch
[:http/api
{:method :post
:url :account/sign-up
:body {:email "user@example.com"
:password "password123"}
:on-success [:sign-up-success]
:on-failure [:sign-up-failure]}])API Endpoint Specification
Authenticated Requests
Token Refresh Mechanism
Request Configuration Options
Option
Type
Description
Handling Responses
On Success
Multiple Success Handlers
On Failure
Multiple Failure Handlers
Common Request Patterns
Login
Authenticated Data Fetch
Form Submission with Loading State
Content Types
CSRF Protection
Error Handling
Implementation Details
Last updated