skip to Main Content

c# JsonConvert.SerializeObject is updating the date

I am trying to remove all indentation from my json : "date": { "start": "2020-10-23T15:30:00+00:00" } I tried with this var freeContent = JsonConvert.SerializeObject(JsonConvert.DeserializeObject(content)); But I got "date": {"start": "2020-10-23T13:30:00+00:00"} As you can see, the date is modified while I…

VIEW QUESTION

Asp.net – How to use "TypedHttpClientFactory" with "AddHttpMessageHandler"?

I have some AuthorizationHandler that I register with a typed client: var clientFactory = services.BuildServiceProvider().GetRequiredService<IHttpClientFactory>(); services.AddHttpClient<TypedClient>() .AddHttpMessageHandler(() => { var authorization = new BearerAuthorization(clientFactory, clientId, clientSecret, authHost, token); return new AuthorizationHandler(authorization); }); When I get the "TypedClient" directly through the…

VIEW QUESTION
Back To Top
Search