Require application/json data on layergroup post

Add tests for bogus calls handling