public ResponseMessage(string errorMessage, RequestData requestData = null) { IsSuccessStatusCode = false; ErrorMessage = errorMessage; Request = requestData; }
public ResponseMessage(byte[] message, RequestData requestData = null, bool isSuccessStatusCode = true) { Content = new ResponseContent(message); IsSuccessStatusCode = isSuccessStatusCode; Request = requestData; }
public async Task<ResponseMessage> GetAsync(string url, string tag = null) { RequestData requestData = new RequestData { Tag = tag, Url = url, Type = RequestData.RequestType.Get, Timeout = Timeout <= new TimeSpan(0, 0, 0) ? _defaultTimeout : Timeout }; using (var scope = IoCService.Container.BeginLifetimeScope()) { return await scope.Resolve<IHttpService>().GetResponse(requestData); } }