...
Pour avoir plus d'information sur les annotations JAX-RS Cf.JAX-RS : Understanding the Basics
Exemple d'utilisation
...
Ajout
Bloc de code |
---|
curl -X PUT \
-H 'Content-Type: application/json' \
-d '{"language":"fr","id":"colmant","displayName":"Y Colmant","informations":[{"informationKey":"TRUC","informationValue":"machin"},{"informationKey":"TRUC2","informationValue":"machin2"}],"admin":false }' \
http://localhost:8080/cxf/rest/domainService/users |
...
Lecture
Bloc de code |
---|
|
curl -X GET \
-H 'Content-Type: application/json' \
http://localhost:8080/cxf/rest/domainService/users |
Renvoie
Bloc de code |
---|
|
[
{ |
Bloc de code |
---|
|
{
"language": "fr",
"id": "colmant",
"displayName": "Y Colmant",
"informationsadmin": false,
"informations": [
{"id": 22,
"informationValue": "machin",
"informationKey": "TRUC"
},
{"id": 23,
"informationValue":53 "machin2",
"informationKey":"INSERT_DATE",
"TRUC2"
},
{"id": 24,
"informationValue": "20112013/0603/1001 1217:57:27:01",
"informationKey": "INSERT_DATE"
}
],
"admin":false
}}
] |
On note que l'on a un item supplémentaire pour informations. C'est le code métier de l'application qui l'a ajouté
Suppression