What do you want to save?
Add Code snippet
New code examples
-
C# 2021-10-28 04:35:14
use newtonsoft json to clone object
// using Newtonsoft.Json; // This sample is from the StackOverflow response (source cited) with // a couple of modifications public static T Clone<T>(T source) { var jsonSettings = new Newtonsoft.Json.JsonSerializerSettings() { // Use this ... Add solution -
PHP 2021-10-27 17:41:10
php discord webhook
<?php //2021 current working model $url = "https://discordapp.com/api/webhooks/0000000/ABCDEFGH...."; // security issue with this being false not tested ?? curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $hookObject = json_encode([ /* ... Add solution -
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 -
PHP 2021-10-19 08:08:35
json_decode(file_get_contents('php //input') true) null
if($_SERVER["REQUEST_METHOD"] == "POST" && $_SERVER["CONTENT_TYPE"] == "application/json") { $data = file_get_contents("php://input", false, stream_context_get_default(), 0, $_SERVER["CONTEN... Add solution