Forum Discussion
Get error when sending JSON formatted data to the device
Hi,
I have gone after the instruction on 'iControl REST 101 – Creating Objects' to run:
curl -sk -u admin:production https://10.183.54.20/mgmt/tm/net/self/ -H 'Content-Type: application/json' -X POST -d '{"name":"cw_test2","address":"10.10.10.3/8","vlan":"internal"}'
and I got error message return as:
{"code":415,"message":"Found invalid content-type. The content-type must be application/json. The received content-type is application/x-www-form-urlencoded","errorStack":[],"apiError":1}
Can you let me know the possible reason to cause it?
- Madhu_Rajagopa1Historic F5 Account
I was successful in creating a self IP with the given curl command. I copied your curl command and tried after changing the management IP on my v12.1.2.
Are you sure you are not missing the -H option when attempting this? I get that error when I don't include the -H option.
What version are you trying this on?
- Christen0125_35
Nimbostratus
im using the -H and still get that error
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com