Details
-
Improvement
-
Status: Resolved
-
Resolution: Cannot Reproduce
-
None
-
None
-
Operating System: All
Platform: All
Description
Testing this I expected a HTTP "OPTIONS" request in both XML and JSON formats to return 200 and a payload describing the OPTIONS available. The XML test was successful, but the JSON test failed and threw a 405 HTTP ERROR.
###Test setup ###
###Steps
Create a data resource
curl -v -X POST -d "<nodes xmlns=\"urn:opendaylight:inventory\"><node><id>id1</id></node></nodes>" localhost:8080/restconf/config/ --header "Content-Type:application/xml" --header "Accept:application/xml"
Verify it was present
curl -v -X GET 172.29.50.236:8080/re "Content-Type:application/xml" --header "Accept:application/xml"
Now I tried to check the OPTIONS, looks ok with XML
curl -v -X OPTIONS 172.29.50.236:8080/restconf/config/opendaylight-inventory:nodes/node/id1 "Content-Type:application/xml" --header "Accept:application/xml
This returns XML you can see it in the attachment.
curl -v -X OPTIONS 172.29.50.236:8080/restconf/config/opendaylight-inventory:nodes/node/id1 "Content-Type:application/xml" --header "Accept:application/json
returns $)% status and a HTML page with a tomcat error message
"The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers."