I had removed the first call to add the header and I made Content-Type case sensitive. However it is still not working. I continue to receive error 612. Does anyone have a sample of working code to call a Create/UpdateLead ? Thanks in advance.
var client = new RestClient(req.endpoint);
//client.AddDefaultHeader("content-type", "json");
// client.Authenticator = new HttpBasicAuthenticator(username, password);
var request = new RestRequest("/v1/leads.json", Method.POST);
request.AddParameter("action", "createOrUpdate");
request.AddParameter("input", inbound.input); // adds to POST or URL querystring based on Method
request.AddParameter("access_token", token.access_token);
// easily add HTTP Headers
request.AddHeader("Content-Type", "text/json");
request.AddHeader("accept", "text/json");
// or automatically deserialize result
// return content type is sniffed but can be explicitly set via RestClient.AddHandler();
IRestResponse<ResponseUpdateCreateLead> response2 = client.Execute<ResponseUpdateCreateLead>(request);
ResponseUpdateCreateLead res = response2.Data;
Alt+MAlt+N