allow posting json to some endpoint
move display logic into else clause.
Merge pull request #3 from MichaelBlume/post-json

allow posting json to some endpoint