Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HTTP HEAD, POST, DELETE methods are needed to support RESTful API #1

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

imeoer
Copy link

@imeoer imeoer commented Jan 19, 2021

Reason for This PR

In general, we need to use these HTTP methods to support RESTful style API:

GET -> Get Resource
HEAD -> Get Resource Metadata
POST -> Create Resource
PUT -> Update Whole Resource
DELETE -> Delete Resource
PATCH -> Update Part Of Resource

Description of Changes

Add support for Method::Head, Method::Post, Method::Delete, which is needed for RESTful style API, also update related test cases.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.

PR Checklist

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any newly added unsafe code is properly documented.
  • Any user-facing changes are mentioned in CHANGELOG.md.

Add support for Method::Delete, which is needed for device hot-removal.
Also fix a clippy warning.

Fixes: firecracker-microvm#12

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
@imeoer
Copy link
Author

imeoer commented Jan 20, 2021

@sameo @sboeuf Please take a look, thanks. :)

@sameo
Copy link
Member

sameo commented Jan 20, 2021

@imeoer Could we also add the API extensions to the changelog file?

Add support for Method::Head and Method::Post, which is needed for
RESTful style API, also update related test cases.

Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
@imeoer
Copy link
Author

imeoer commented Jan 20, 2021

@sameo Thanks, already added to CHANGELOG and bump version to v0.2.0.

@sameo sameo merged commit af72318 into cloud-hypervisor:master Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants