The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

.NET SDK Response StatusCode issues

SOLVED
Go to solution
Highlighted
Occasional Advisor

.NET SDK Response StatusCode issues

I downloaded the .NET SDK from GitHub on 10/17 (and this morning as well... https://github.com/constantcontact/.net-sdk) and discovered that the CTCTWrapper is not handling response.StatusCode properly in the RestClient.cs HttpRequest method.  It is looking for a 200 StatusCode as success; however, there are quite a few methods (most if not all of the Create methods) that have other status codes that indicate success (201 for Creates and 204 for some deletes as examples).

 

I've fixed my solution to account for these and I'm willing to share my corrections with others.  Is there someone I can pass my updates to?  Or is the link that I used incorrect for the v2 service contract?

 

I also added the is_permission_reminder_enabled field to the EmailCampaign.cs file because I found that was missing.

 

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Honored Contributor

Re: .NET SDK Response StatusCode issues

Hi Karl,

 

We recently updated the SDK with the status code fixes, but we are definitely interested in any other bugs that you have found and corrected. The best way to submit changes is to fork our repository on Github, make the changes in your fork of the repository, and then submit a pull request back to the Constant Contact repository. This method allows us to easily see what has changed and quickly test changes so that they can be merged into the existing code.

 

If you have any problems doing this, please let us know!

 

Sincerely,

Elijah G.
API Support Engineer

View solution in original post

1 REPLY 1
Highlighted
Honored Contributor

Re: .NET SDK Response StatusCode issues

Hi Karl,

 

We recently updated the SDK with the status code fixes, but we are definitely interested in any other bugs that you have found and corrected. The best way to submit changes is to fork our repository on Github, make the changes in your fork of the repository, and then submit a pull request back to the Constant Contact repository. This method allows us to easily see what has changed and quickly test changes so that they can be merged into the existing code.

 

If you have any problems doing this, please let us know!

 

Sincerely,

Elijah G.
API Support Engineer

View solution in original post

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured