What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-09 01:19:12
HttpClient .net Core add Certificate
Module m = Assembly.GetEntryAssembly().GetModules()[0]; using (var cert = m.GetSignerCertificate()) using (var cert2 = new X509Certificate2(cert)) { var _clientHandler = new HttpClientHandler(); _clientHandler.ClientCertificates.Add(cert2); _clie... Add solution -
C# 2021-11-08 21:47:15
restclient c#
//example code //var lst = await service.ConnectHttpClient<User, List<User>>("api/User/GetUserInfoByUserId", new User() { UserId = 1 }); //var lst = await service.ConnectRestClient<User, List<User>>("api/User/GetUser... Add solution -
Javascript 2021-11-07 11:29:12
convert json in parse inputs azure function
#r "Newtonsoft.Json" using System.Net; using Newtonsoft.Json; public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) { dynamic body = await req.Content.ReadAsStringAsync(); var e = JsonConvert.... Add solution -
Other 2021-11-05 08:39:10
DeleteAsync
HttpResponseMessage response = _client.PostAsync("/post", new StringContent(JsonConvert.SerializeObject(obj), Encoding.UTF8, "application/json")).Result; string res = await response.Content.ReadAsStringAsync(); return await JsonConvert... Add solution -
C# 2021-11-04 17:54:10
webclient c# example post
//Base code from: http://zetcode.com/csharp/httpclient/ public async string Example() { //The data that needs to be sent. Any object works. var pocoObject = new { Name = "John Doe", Occupation = "gardener" }; //Conver... Add solution -
C# 2021-10-30 07:19:08
c# httpclient postasync stringcontent
private static async Task PostBasicAsync(object content, CancellationToken cancellationToken) { using (var client = new HttpClient()) using (var request = new HttpRequestMessage(HttpMethod.Post, Url)) { var json = JsonConvert.Serialize... Add solution -
C# 2021-10-30 05:17:09
c# object to json online converter
//Make use of the third party library called Newton soft. //To serialize a JSON object to C# class. The below will help. //Note: The C# class and JSON Object should have the same structure public static T Deserialize(string serializedData) {... Add solution