What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-12 19:54:27
c# post get request
using System.Net.Http; HttpClient client = new HttpClient(); /// POST /// var values = new Dictionary<string, string> { { "thing1", "hello" }, { "thing2", "world" } }; var content = new FormUrlEncod... 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-26 22:27:06
httpclient C#
// HttpClient is intended to be instantiated once per application, rather than per-use. See Remarks. static readonly HttpClient client = new HttpClient(); static async Task Main() { // Call asynchronous network methods in a try/catch block to handle ex... Add solution -
C# 2021-10-19 18:51:04
oauth2 authentication .net core example
using System.Net.Http; using System.Net.Http.Headers; using System.Security.Claims; using System.Text.Json; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.OAuth; usin... Add solution -
Javascript 2021-10-19 13:17:12
jest async test fetch api
// fetch.js async function fetchUser() { const url = 'https://jsonplaceholder.typicode.com/users' const response = await fetch(url) return await response.json() } const fetchPosts = { async postAPI() { const url = 'https://jsonplaceholder.typ... Add solution