Skip to content

$post and $get helpers to wrap around $fetch #104

Answered by SimoTod
KevinBatdorf asked this question in Ideas
Discussion options

You must be logged in to vote

It makes sense and it's probably just a few bytes. I wonder if they should just be $post(url, data) and $get(url) to cover the simple cases.
For example

$post(
  '/user/12345',{​​firstName​: ​'Fred', lastName​: ​'Flintstone'}
)

If someone needs to pass custom options, they can use the full featured $fetch.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SimoTod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants