I'm currently developing an Android App that uses REST to communicate with drupal
I've setup the Service module and got it working with normal "post" content type nodes
But, if i post a question
node from the Answers module, it would not work.
So, I post an JSON string like this:
{"node":
{
"title":"REST question",
"type":"question",
"language":"und",
"body":[
{
"und":{
"value":"REST content",
"format":"filtered_html"
}
}
]
}
}
Drupal would respond like this:
Request header:
Request Url: http://www.mubie.com/rest_api/node.xml
Request Method: POST
Status Code: 200 //<- the request is valid...
Params: {}
Respond body:
<?xml version="1.0" encoding="utf-8"?>
<result>
<nid />
<uri>http://www.myhost.com/?q=rest_api/node/</uri>
</result>
now, normally, if I post something like a blog post, it would return the node(nid) url, but with a question
content type, it returns the url that lists all nodes.
Also, the content is not added to drupal
How do i make it post my question
content properly and return a node url?