Is there a way to override web Request or any other thing to log request/response for every web request(FTP or SFTP) we make.
I want to log it in DB thats why I want to override somehow.
Please note: I am asking solution for asp.net Core only.
Is there a way to override web Request or any other thing to log request/response for every web request(FTP or SFTP) we make.
I want to log it in DB thats why I want to override somehow.
Please note: I am asking solution for asp.net Core only.
Consider using RestSharp for .net core and log the response.Content
which contains the raw response received on the wire, and then you could do like suggested here to get the request body before sending it:
request.Parameters.Where(p => p.Type == ParameterType.RequestBody).FirstOrDefault();