Apache/CXF: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
==JAX-RS== | |||
<source lang="bash"> | |||
# find all | |||
curl --request GET \ | |||
--url http://api.chorke.org/academia/api/v1.00/projects \ | |||
--header 'authorization: Basic dXNlcjpwYXNz' \ | |||
--header 'content-type: application/json' \ | |||
--header 'cache-control: no-cache' | |||
</source> | |||
<source lang="bash"> | |||
# find by id | |||
curl --request GET \ | |||
--url http://api.chorke.org/academia/api/v1.00/projects/1 \ | |||
--header 'authorization: Basic dXNlcjpwYXNz' \ | |||
--header 'content-type: application/json' \ | |||
--header 'cache-control: no-cache' | |||
</source> | |||
<source lang="bash"> | |||
# create/save | |||
curl --request POST \ | |||
--url http://api.chorke.org/academia/api/v1.00/projects \ | |||
--header 'authorization: Basic dXNlcjpwYXNz' \ | |||
--header 'content-type: application/json' \ | |||
--header 'cache-control: no-cache' \ | |||
--data '{"name": "Academia"}' | |||
</source> | |||
<source lang="bash"> | |||
# update by id | |||
curl --request PUT \ | |||
--url http://api.chorke.org/academia/api/v1.0.00/projects/1 \ | |||
--header 'authorization: Basic dXNlcjpwYXNz' \ | |||
--header 'content-type: application/json' \ | |||
--header 'cache-control: no-cache' \ | |||
--data '{"id": "1", "name": "Academia"}' | |||
</source> | |||
<source lang="bash"> | |||
# delete by id | |||
curl --request DELETE \ | |||
--url http://api.chorke.org/academia/api/v1.0.00/projects/1 \ | |||
--header 'authorization: Basic dXNlcjpwYXNz' \ | |||
--header 'content-type: application/json' \ | |||
--header 'cache-control: no-cache' \ | |||
--data '{"id": "1", "name": "Academia"}' | |||
</source> | |||
==References== | ==References== | ||
* [https://code.massoudafrashteh.com/spring-boot-cxf-jaxrs-hibernate-maven-swagger-ui Spring Boot, Apache CXF, Swagger under JAX-RS] | * [https://code.massoudafrashteh.com/spring-boot-cxf-jaxrs-hibernate-maven-swagger-ui Spring Boot, Apache CXF, Swagger under JAX-RS] |
Revision as of 23:18, 2 March 2019
JAX-RS
# find all
curl --request GET \
--url http://api.chorke.org/academia/api/v1.00/projects \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache'
# find by id
curl --request GET \
--url http://api.chorke.org/academia/api/v1.00/projects/1 \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache'
# create/save
curl --request POST \
--url http://api.chorke.org/academia/api/v1.00/projects \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache' \
--data '{"name": "Academia"}'
# update by id
curl --request PUT \
--url http://api.chorke.org/academia/api/v1.0.00/projects/1 \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache' \
--data '{"id": "1", "name": "Academia"}'
# delete by id
curl --request DELETE \
--url http://api.chorke.org/academia/api/v1.0.00/projects/1 \
--header 'authorization: Basic dXNlcjpwYXNz' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache' \
--data '{"id": "1", "name": "Academia"}'