public virtual async Task CallProcess()

in src/ApiForFhirMigrationTool.Function/Processors/FhirProcessor.cs [29:54]


        public virtual async Task<ResponseModel> CallProcess(HttpMethod method, string requestContent, Uri baseUri, string queryString, string endpoint)
        {
            try
            {
                var request = new HttpRequestMessage
                {
                    Method = method,
                    RequestUri = new Uri(baseUri, queryString),
                    Headers =
                    {
                        { HttpRequestHeader.Accept.ToString(), "application/fhir+json" },
                        { "Prefer", "respond-async" },
                    },
                    Content = new StringContent(requestContent, Encoding.UTF8, "application/fhir+json"),
                };

                HttpResponseMessage fhirResponse = await _fhirClient.Send(request, baseUri, endpoint);
                ResponseModel processResponse = CreateProcessResponse(fhirResponse);
                return processResponse;
            }
            catch
            {
                _logger?.LogError($"Error occurred at FhirProcessor:CallProcess().");
                throw;
            }
        }