updated with application/json content
fixes for domain create/update
refactoring to support code reuse
adding (integration) tests