Update app to accept GET and POST

The spec is unclear, but seems like it wants to accept
a JSON POST request even though this isn't WebDAV.

Allow it anyway.

Add some more error checking, just in case.