Send "type" as array for JSON requests
authorAaron Parecki <aaron@parecki.com>
Wed, 22 Mar 2017 18:46:42 +0000 (11:46 -0700)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 23 Mar 2017 06:41:06 +0000 (07:41 +0100)
e.g. `{"type":["h-entry"], ... }`

https://www.w3.org/TR/micropub/#json-syntax

src/shpub/Request.php

index 32e25de..8262863 100644 (file)
@@ -56,7 +56,7 @@ class Request
                 $data['url'] = $this->url;
             }
             if ($this->type !== null) {
-                $data['type'] = 'h-' . $this->type;
+                $data['type'] = array('h-' . $this->type);
             }
             if (count($this->properties)) {
                 $data['properties'] = $this->properties;