static ResponseJob SendCSV(RequestJob requestJob, string csv) { ResponseJob responseJob = CreateJob(requestJob); PutFile(responseJob, csv); CloseJob(responseJob.ID); return(responseJob); }
static void PutFile(ResponseJob responseJob, string csv) { string url = Url.Combine(instanceURL, $"/services/data/{versionAPI}/jobs/ingest/{responseJob.ID}/batches"); string result = url .WithHeader("Content-Type", "text/csv") .WithHeader("Accept", "application/json") .WithOAuthBearerToken(access.AccessToken) .WithTimeout(200) .PutStringAsync(csv).ReceiveString().Result; }