Пример #1
0
        static void OnBeforeRequestFhirServer(object sender, Hl7.Fhir.Rest.BeforeRequestEventArgs e)
        {
            var requestAdderss = e.RawRequest.Address.ToString();
            var requestBody    = e.Body;

            Log.Information($"requestAdderss:{requestAdderss}");
            Log.Information($"requestBody:{requestBody}");

            // Replace with a valid bearer token for the server
            //e.RawRequest.Headers.Add("Authorization", "Bearer XXXXXXX");
        }
Пример #2
0
 private void Client_OnBeforeRequest(object sender, Hl7.Fhir.Rest.BeforeRequestEventArgs e)
 {
     e.RawRequest.Headers.Add("Authorization", "Bearer " + _accessToken);
 }