K
K
Kintoha2016-03-26 17:39:49
API
Kintoha, 2016-03-26 17:39:49

How to send a POST request with an array in C#?

Good day.
I can't figure out how to send an array as a POST request to the server from C#.
Needed to add a contact to amoCRM.
Here is the documentation https://developers.amocrm.ru/rest_api/contacts_set.php
Can anyone tell me how to send a POST with a name, phone number and Email?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Evseev, 2016-03-31
@alex1t

Since the service api accepts json, then you need to form the correct json:
- ruseller.com/lessons.php?rub=28&id=702
- www.json.org/json-ru.html
The array is enclosed in square brackets:
"{ "array" : [ 1, 2, 3, 4, 5 ] }"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question