Skip to content

Instantly share code, notes, and snippets.

@LeVadim
Created July 3, 2016 13:34
Show Gist options
  • Save LeVadim/a22e4d84f935673dc788bbc8f902068d to your computer and use it in GitHub Desktop.
Save LeVadim/a22e4d84f935673dc788bbc8f902068d to your computer and use it in GitHub Desktop.
Angular 2 code which substitutes $httpParamSerializerJQLike
private formatData(data){
let returnData = '';
console.log(data);
let count = 0;
for (let i in data){
if(count == 0){
returnData += i+'='+data[i];
}else{
returnData += '&'+i+'='+data[i];
}
count = count + 1;
console.log(returnData);
}
return returnData;
}
@VinuthaShreyas
Copy link

How to make a http server call using this formatted data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment