Revision history [back]

click to hide/show revision 1
initial version

Hi volenbovsky and everyone,

I added -H "Content-type: application/json" to curl command as you said but I encounter other error My command:

curl -s -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-type: application/json" \
  $OS_COMPUTE_API/flavors \
  -d '{\
    "flavor": {\
        "name": "test_flavor",\
        "ram": 1024,\
        "vcpus": 2,\
        "disk": 10,\
        "id": "10",\
        "rxtx_factor": 2.0\
    }\
}' \
  | python -m json.tool

Error:

{
    "badRequest": {
        "code": 400,
        "message": "Malformed request body"
    }
}

Do you have any idea about this error?

Thanks

Hi volenbovsky and everyone,

I added -H "Content-type: application/json" to curl command as you said but I encounter other error error

My command:

curl -s -H "X-Auth-Token: $OS_TOKEN" \
  -H "Content-type: application/json" \
  $OS_COMPUTE_API/flavors \
  -d '{\
    "flavor": {\
        "name": "test_flavor",\
        "ram": 1024,\
        "vcpus": 2,\
        "disk": 10,\
        "id": "10",\
        "rxtx_factor": 2.0\
    }\
}' \
  | python -m json.tool

Error:

{
    "badRequest": {
        "code": 400,
        "message": "Malformed request body"
    }
}

Do you have any idea about this error?

Thanks