Skip to content

hayleigh-dot-dev/rsvp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsvp

Package Version Hex Docs

gleam add rsvp@1

Rsvp helps you make HTTP requests and handle their responses in a Lustre application. This library supports both client side SPAs and components, and server components meaning applications that use rsvp are more likely to be suitable as universal components.

Usage

Rsvp separates the concerns of making HTTP requests from handling their responses meaning we need to do three things to properly make a request:

  • First, we must define a Handler that describes how to handler the response and turn it into a message your update function can understand.

  • Second, we must create the Effect that describes the request using either the get or post convenience functions, or by constructing a Request and using send directly.

  • Finally, we must return that Effect in our application's init or update functions so that the runtime can perform the request.

Recipes

The following recipes are available to help you get started with rsvp:

If you think a common use case is missing or you'd like to contribute a recipe yourself, please open an issue or pull request!

About

Send HTTP requests from Lustre applications and server components.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •