Console.WriteLine("Loading Azure Consumption for period: " + Period);
var req = new DTO.Request.AuthRequest();
try
{
var url = req.ToPostUrl(); // This construct my url correctly cause I have my Route with my tenant in my DTO
var response = url.PostJsonToUrl(req, r =>
{
Console.WriteLine("Request");
r.PrintDump();
}, rep =>
{
Console.WriteLine("Response");
rep.PrintDump();
});
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
I don’t understand the question, the req is your Request DTO which is what’s used for the HTTP Request Body, from this example it looks like you’re sending an empty AuthRequest DTO.
You can’t access the Request Body that’s written to the Request Stream, but what gets sent is your DTO serialized as JSON, e.g. req.ToJson(). To view the actual HTTP Request that’s sent you’d need a HTTP Packet sniffer like Fiddler.