Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

API2 client.PostAsync - post several records at once or 1-by-1 only?

$
0
0

Hi all,

is it possible to use API2 client.PostAsync to post several records from a json serialised object?

or have I got to go round in a loop and post  1 record at a time?

something like this (not working):

var serialisedMeasureList = JsonConvert.SerializeObject(recsforTR_IDList,Formatting.Indented);

var client = newHttpClient();

var url = string.Format("{0}/api/MEASURE_CAPTURE1/PutByTR_ID", APIConnection);

var response = client.PostAsync(url, serialisedMeasureList).Result;

many thanks

Stew


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>