0.11.0 • Published 29 days ago

vrf-rest v0.11.0

Weekly downloads
-
License
ISC
Repository
-
Last release
29 days ago

Node.js CI

vrf-rest

REST API for vrf.

It implements REST contract for resource, for example

<rf-form
  name="Todo"
  auto 
/>

For this form vrf-rest uses following http requests:

GET /todos/:id - on load

POST /todos - on create

PATCH /todos/:id - on update

Id may be calculated through the url using idFromRoute vrf helper, or passed directly using rf-id prop.

For the form in single mode

<rf-form
  name="Todo"
  single
  auto 
/>

It serves like that:

GET /todos - on load

PATCH /todos - on update

Sometimes you need to execute action on resource without getting data, for this purpose you may use action mode:

<rf-form
  name="Todo#addComment"
  :rf-id="1"
  auto 
>
  <rf-input name="message" />
  <rf-submit />
</rf-form>

This form sends POST request to /todos/1/add_comment.

If a form contains files vrf-rest uses multiplaylod format which allows to send files and keep data types of other form elements at the same time. Example of a mixin for rails controller to support the format

module MultipayloadController
  def params
    ActionController::Parameters.new(JSON.parse(super[:_json] || '{}').deep_merge(super.except(:_json)))
  end
end
0.11.0

29 days ago

0.10.2

11 months ago

0.9.3

2 years ago

0.10.1

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.8.2

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.6.2

2 years ago

0.7.3

2 years ago

0.5.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.3.6-effects.4

3 years ago

0.3.6-effects.5

3 years ago

0.3.6-effects.2

3 years ago

0.3.6-effects.3

3 years ago

0.3.6-effects.0

3 years ago

0.3.6-effects.1

3 years ago

0.4.0

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago