Problem when create New commnet following first screencast

Oct 28, 2012 at 5:18 AM

I post url is "http://localhost:12377/objects/Model.Comment"

request body is:

{
                "arguments": {
                    "members": {
                        "Authod": {
                            "value": "ddd"
                        },
                        "Id": {
                            "value": 0
                        },
                        "Text": {
                            "value": "ddd"
                        }
                    }
                },
                "rel": "urn:org.restfulobjects:rels/persist",
                "method": "POST",
                "type": "application/json; profile=\"urn:org.restfulobjects:repr-types/object\"; charset=utf-8",
                "href": "http://localhost:12377/objects/Model.Comment"
            }

Oh It is so sad, it retrun "400 Bad Requet."

 

Coordinator
Oct 28, 2012 at 10:15 AM

You're putting too much into the request body  -  it should just be the JSON following the pattern specified in the arguments.

I recommend you read the Restful Objects specification rather than just try to mimic the demo  -  then you'll gain a better understanding of 'why' as well as 'what'.

Richard