when creating a new resource, wrap the document in an array.
Merge pull request #66 from mikaa123/use-array-when-creating-resource

when creating a new resource, wrap the document in an array.