public void LogItkRequest(OutcomeViewModel model, ITKDispatchRequest itkRequest) { var audit = model.ToAuditEntry(); var auditedItkRequest = Mapper.Map <AuditedItkRequest>(itkRequest); audit.ItkRequest = JsonConvert.SerializeObject(auditedItkRequest); Log(audit); }
public async Task LogItkRequest(OutcomeViewModel model, ITKDispatchRequest itkRequest) { var audit = model.ToAuditEntry(new HttpSessionStateWrapper(HttpContext.Current.Session)); var auditedItkRequest = Mapper.Map <AuditedItkRequest>(itkRequest); audit.ItkRequest = JsonConvert.SerializeObject(auditedItkRequest); await Log(audit); }
private async Task <IRestResponse> SendItkMessage(ITKDispatchRequest itkRequestData) { var request = new JsonRestRequest(_configuration.ItkDispatcherApiSendItkMessageUrl, Method.POST); request.AddJsonBody(itkRequestData); var response = await _restClientItkDispatcherApi.ExecuteAsync(request); return(response); }
private async Task <HttpResponseMessage> SendItkMessage(ITKDispatchRequest itkRequestData) { var request = new HttpRequestMessage { Content = new StringContent(JsonConvert.SerializeObject(itkRequestData), Encoding.UTF8, "application/json") }; var response = await _restfulHelper.PostAsync(_configuration.ItkDispatchApiUrl, request); return(response); }
public async Task <ITKDispatchResponse> SendItkMessage(ITKDispatchRequest request) { BypassCertificateError(); var submitHaSCToService = _mappingEngine.Mapper.Map <ITKDispatchRequest, SubmitHaSCToService>(request); SubmitHaSCToServiceResponse response = null; try { response = await _itkDispatcher.SubmitHaSCToServiceAsync(submitHaSCToService); } catch (Exception ex) { return(_itkDispatchResponseBuilder.Build(ex)); } return(_itkDispatchResponseBuilder.Build(response)); }