public virtual ofWorker Create(ofWorkerCreateOptions createOptions, ofRequestOptions requestOptions = null) { requestOptions = SetupRequestOptions(requestOptions); string serilizedObj = JsonConvert.SerializeObject(createOptions, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }).ToString(); var PostData = new StringContent(serilizedObj, Encoding.UTF8, "application/json"); var worker = Requestor.Post<ofWorker>(Urls.Workers, requestOptions, PostData); return worker; }
public virtual ofWorker Create(ofWorkerCreateOptions createOptions, ofRequestOptions requestOptions = null) { requestOptions = SetupRequestOptions(requestOptions); string serilizedObj = JsonConvert.SerializeObject(createOptions, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }).ToString(); var PostData = new StringContent(serilizedObj, Encoding.UTF8, "application/json"); var worker = Requestor.Post <ofWorker>(Urls.Workers, requestOptions, PostData); return(worker); }