Created
April 8, 2024 00:30
-
-
Save moo2u2/91ab04e74f918507b268f10e04471b63 to your computer and use it in GitHub Desktop.
Log OrderCloud SDK HTTP calls through Flurl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FlurlHttp.Configure(settings => settings.BeforeCall = (FlurlCall call) => | |
{ | |
app.Logger.LogInformation($"Calling {call.Request.Url} with {call.RequestBody}"); | |
}); | |
FlurlHttp.Configure(settings => settings.OnError = (FlurlCall call) => | |
{ | |
app.Logger.LogError(call.Exception, $"Error calling {call.Request.Url}"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment