I'm trying to register an app via the REST API. I'm getting a 400 when trying to post JSON data, but posting an XML works.
Has anyone run into this before? Thanks in advance for your help
Request:
http://localhost:8080/eureka/v2/apps/test
Content-Type: application/xml
<?xml version="1.0" ?>
<instance>
<vipAddress>test</vipAddress>
<leaseInfo>
<evictionDurationInSecs>90</evictionDurationInSecs>
</leaseInfo>
<securePort>443</securePort>
<hostName>foo.local</hostName>
<secureVipAddress/>
<app>test</app>
<homePageUrl/>
<ipAddr>1.1.1.1</ipAddr>
<dataCenterInfo>
<name>MyOwn</name>
</dataCenterInfo>
<healthCheckUrl/>
<region>default</region>
<preferSameZone>False</preferSameZone>
<port>1010</port>
<statusPageUrl/>
<metadata>
<foo>bar</foo>
</metadata>
</instance>"
Response:
Status
204 No Content
Request:
http://localhost:8080/eureka/v2/apps/test
Content-Type: application/json
{
"instance": {
"vipAddress": "test",
"leaseInfo": {
"evictionDurationInSecs": 90
},
"securePort": 443,
"hostName": "foo.local",
"secureVipAddress": null,
"app": "test",
"homePageUrl": null,
"ipAddr": "1.1.1.1",
"dataCenterInfo": {
"name": "MyOwn"
},
"healthCheckUrl": null,
"region": "default",
"preferSameZone": false,
"port": 1010,
"statusPageUrl": null,
"metadata": {
"foo": "bar"
}
}
}
Response:
Status
400 Bad Request
{
error: "cannot parse request body"
}
--
Hari
--
You received this message because you are subscribed to the Google Groups "eureka_netflix" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eureka_netfli...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.