Skip to content

Instantly share code, notes, and snippets.

Avatar
🐜
ant has power

hacke2 hacke2

🐜
ant has power
View GitHub Profile
View lightpromise.js
function get(uri) {
return http(uri,'GET');
}
function post(uri,data) {
if(typeof data === 'object' && !(data instanceof String || (FormData && data instanceof FormData))) {
var params = [];
for(var p in data) {
if(data[p] instanceof Array) {
for(var i = 0; i < data[p].length; i++) {
params.push( encodeURIComponenet(p) + '[]=' + encodeURIComponenet(data[p][i]);
You can’t perform that action at this time.