Removed unused imports.
Added AMSApiClientException which keeps the responsecode so a user of the client can make an informed descision on what to do with for example 404 or 500.