The C# Library has a Utility.bulkUrlEncoded() function which can handle this for you. A quick example of using this would be:
AuthenticationData authdata = new AuthenticationData ( ) ; authdata . Username = "USERNAME" ; authdata . Password = "PASSWORD" ; authdata . ApiKey = "APIKEY" ; List < string > lists = new List < string > ( ) ; String lineBreak = HttpUtility . UrlDecode ( "%0A" ) ; lists . Add ( "https://api.constantcontact.com/ws/customers/{username}/lists/{list-id}" ) ; String myString = "Email Address,First Name,Last Name" + lineBreak + "wstest3@example.com, Fred, Test" + lineBreak + "wstest4@example.com, Joan, Test" ; String response = Utility . bulkUrlEncoded ( authdata, myString, lists ) ; MessageBox . Show ( response ) ;
I hope this helps. Please let us know if you have any other questions or concerns regarding this. Thanks.
... View more