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-07 10:52:11
paging entity framework core
public static class PaginationService { public static async Task<Pagination<T>> GetPagination<T>(IQueryable<T> query, int page, string orderBy, bool orderByDesc, int pageSize) where T : class { Pagination<T> ... 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 -
Javascript 2021-11-03 08:35:12
redux fetch data using axios
// action type const FETCH_ALL = "FETCH_ALL"; const FETCH_FAIL = "FETCH_FAIL"; // initial state const fetchState = { users: [], error: "" }; //action creator const fetchDataAsync = () => { return (dispatch) => {... Add solution