Skip to content

roland/HttpBuildQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

HttpBuildQuery
====================

What it is?
----------

This is a C# version of the http://php.net/http_build_query. 
I had a hard time finding a replacement for http_build_query in .NET as I was working with the MailChimp API and wrote this as a helper.


Usage
----------

HttpBuildQueryHelper.Format(HttpBuildQueryHelper.Convert(myObject))

HttpBuildQueryHelper.Convert - recursively uses reflection to create a strucutre that HttpBuildQueryHelper.Format can use.

You can also use anonymous types:

HttpBuildQueryHelper.Format(HttpBuildQueryHelper.Convert(new { myKey = new int[] {1,2,3} } ))

which will generate "myKey[0]=1&myKey[1]=2&myKey[2]=3".

About

Equivalent of http_build_query in PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages