Example #1
0
        private static void ProcessRequestPasswordReminder(HttpResponseMessage response)
        {
            if (response.StatusCode == HttpStatusCode.OK)
            {
                return;
            }

            throw ErrorResponseExceptionFactory.CreateException(response, null);
        }
Example #2
0
        private void ProcessUploadImageResponse(HttpResponseMessage response)
        {
            if (response.StatusCode == HttpStatusCode.OK)
            {
                return;
            }

            var potentialErrors = HttpChannel.TryExtractErrorsFromResponse(response.Content);

            throw ErrorResponseExceptionFactory.CreateException(response, potentialErrors);
        }
Example #3
0
        private static bool ProcessIsEmailRegisteredResponse(HttpResponseMessage response)
        {
            switch (response.StatusCode)
            {
            case HttpStatusCode.OK:
                return(true);

            case HttpStatusCode.NotFound:
                return(false);

            default:
                throw ErrorResponseExceptionFactory.CreateException(response, null);
            }
        }