Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291324

REST export view should default to XML

$
0
0

I'm not sure how/why this started happening, but when I turn on rest.module and hit http://8x.localhost:8082/entity/node/1 in my browser, I get:

<response>
<nid>
<value>1</value>
</nid>
<uuid>
<value>1d0b7f7c-18e6-4023-a700-bef36f2e00c3</value>
</uuid>
<vid>
<value>1</value>
</vid>
<type>
<value>article</value>
</type>
...

Awesome! Didn't even need to carefully craft some cURL request to send an Accept header!

However, if I hit a REST export view in my browser, I get:

Error

The website has encountered an error. Please try again later.
Error message
Symfony\Component\Serializer\Exception\UnexpectedValueException: Serialization for the format html is not supported in Symfony\Component\Serializer\Serializer->serialize() (line 78 of /Users/webchick/Sites/8.x/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php).

This is decidedly un-user friendly. :)

Let's figure out how rest.module is doing its magic for entities and get it to do it for Views as well. :)


Viewing all articles
Browse latest Browse all 291324

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>