示例#1
0
        static ResponseJob SendCSV(RequestJob requestJob, string csv)
        {
            ResponseJob responseJob = CreateJob(requestJob);

            PutFile(responseJob, csv);
            CloseJob(responseJob.ID);
            return(responseJob);
        }
示例#2
0
        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;
        }