Web Services - GET Request Article (HAL+JSON)

by nielsv   Last Updated April 19, 2018 16:07 PM

I'm trying to make a GET request to a specific article on my drupal 8 website (local). These are the steps I've done:

  1. Enabled all 4 Web Services modules at the modules page
  2. Created an article (url: http://dp8studyxb14copy.dev/node/4)
  3. Changed permissions for Access GET on Content resource for all users (also Anonymous Users) enter image description here
  4. Installed REST UI module.
  5. Changed settings for content nodes (admin/config/services/rest/resource/entity%3Anode/edit) enter image description here
    1. Make a GET request enter image description here

But the problem is as you can see is that he returns HTML... . Now when I make a REST export view with a list of articles it works ... But not from a node itself.. .

What am I doing wrong?

Tags : 8 services json


Answers 1


Drupal 8 doesn't use accept headers for this anymore because it was problematic for caching.
Use ?_format=hal_json instead.

Berdir
Berdir
August 24, 2015 20:55 PM

Related Questions


field_image path url in services

Updated December 14, 2017 06:07 AM

Drupal and Bonita communication by REST API

Updated April 17, 2018 10:07 AM

Drupal 8 convert json to Array

Updated July 27, 2016 08:03 AM




Cache file /home/queryxchang/public_html/apps/frontend/config/../cache/-q-8-170827-web-services-get-request-article-hal-json- could not be written