What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-22 06:57:10
python requests with login
>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')) >>> r.status_code 200 >>> r.headers['content-type'] 'application/json; charset=utf8' >>> r.encoding 'utf-8' >>> r.text '{"type&quo... 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 -
Other 2021-10-19 09:29:10
the request entity's media type 'text/plain' is not supported for this resource
var json = JsonConvert.SerializeObject(body); var content = new StringContent(json); content.Headers.ContentType= new MediaTypeHeaderValue("application/json"); return _client.PostAsync(requestUri, content); https://bartwullems.blogspot.com/2018... Add solution -
Go 2021-10-19 02:33:03
golang render html template
// parse html via index.html package main import ( "net/http" "text/template" ) type Context struct { Title string Name string Fruits [3]string } func main() { http.HandleFunc("/", func(w http.ResponseWriter, req... Add solution
Best helpers
Arad
+5
JoshuaFicy
+5
Majte
+5
Entrepreneur
+5
Meital Regev
+5
Shenkwen
+5
Digcoal
+5
A G Davey
+5
NeuronQ
+5
Emmet
+5
Muazam
+5
Vigrond
+5
Scoiattolo
+5
Erica Price
+5