Closed jbonnet closed 7 years ago
Hi,
It’s the way it’s receiving the parameters. Doing a request using normal post parameters works fine.
curl -d 'description=Private&duration=10' http://localhost:5000/api/v1/types/
{"status_code:": 200, "data": {"duration": 10, "status": "ACTIVE", "type": "Private", "type_uuid": "181c1480-b2c4-4f1f-9dda-a2cebd70c7d5"}, "description": "Type successfully created", "error": “"}
Hope it helped.
Bruno Silva
On 25 Jan 2017, at 15:31, José Bonnet notifications@github.com<mailto:notifications@github.com> wrote:
Assigned #388https://github.com/sonata-nfv/son-gkeeper/issues/388 to @bsilvrhttps://github.com/bsilvr.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sonata-nfv/son-gkeeper/issues/388#event-936312371, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIkuysBoWM3-UhsqRTcyHhXnaKNthnfCks5rV2q0gaJpZM4Ltnvm.
Thanks, @bsilvr
I can confirm that. I thought that by indicating the application/json
content-type would solve it...
Help is needed: to create a licence type, I'm doing this
$ curl -v -H 'content-type:application/json' -d '{"description":"Private","duration":"10"}' sp.int3.sonata-nfv.eu:5900/api/v1/types/
(in the command line), and getting this
{"status_code:": 400, "data": "", "description": "Missing description or duration argument", "error": "Missing fields"}
What am I doing wrong?