Skip to content

Instantly share code, notes, and snippets.

@xujiesh0510
xujiesh0510 / ApiHttpGetModelParser.js
Last active March 25, 2022 09:32
Convert javascript complex object to ASP.NET Web Api Get Method
// Usage:
// var parser = new ApiHttpGetModelParser();
// var result = parser.parseApiGetModel({id:1,arr:[1,2,3]}); // suit web api
// result is {"id":1,"arr[0]":1,"arr[1]":2,"arr[2]":3}
function ApiHttpGetModelParser() {
@xujiesh0510
xujiesh0510 / Handler.cs
Last active June 26, 2017 13:52
use IHttpHandler and HttpClient to Create Request Proxy For another Site
using System;
using System.Configuration;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Web;
namespace Console.handler
{