DEV Community

Discussion on: Updating a Record Using C# .NET and the Salesforce REST API

Collapse
 
rickystam profile image
Ricky Stam

First of all, thank you for the nice article!
I am curious on why you need to check for the empty string for success, wouldn't checking the Response HTTP Status Code enough? My expectation would be that for success the response would be 200 or 204 and in case of failure 500, 400 or something else that indicates failure.

Collapse
 
rachelsoderberg profile image
Rachel Soderberg

That's a great idea, I'm going to look into this! I'm still learning as I go, and this was the best method I came up with as I am also new to working with web development in general, so I appreciate the pointer. This actually sounds like a cleaner way to do it.