Skip to content

Instantly share code, notes, and snippets.

@kurtisdunn
Last active December 9, 2015 05:57
Show Gist options
  • Save kurtisdunn/0e9947cc83ee1742659c to your computer and use it in GitHub Desktop.
Save kurtisdunn/0e9947cc83ee1742659c to your computer and use it in GitHub Desktop.
Drupal 8 REST POST Requests
//Create a new forum topic
http://d8.dev:3000/entity/node?_format=hal_json
{
"_links": {
"type": {
"href": "http://d8.dev/rest/type/node/forum"
}
},
"type":[{"target_id":"forum"}],
"title": [{
"value": "Ive made a post to a topic!"
}],
"taxonomy_forums": [{
"target_id": "10"
}],
"body":[{
"value": "<p>Vestibulum id ligula porta felis euismod semper. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Etiam porta sem malesuada magna mollis euismod.</p>"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment