Answer the question
In order to leave comments, you need to log in
Sharing data using web services?
Hello everyone, where there is detailed documentation on HTTPS request from 1C. There is a task. The site has shoes with sizes, It is necessary when shoes of size 38 were made at the 1C checkout, for example, and there are 2 of them in the database, then after breaking through it is necessary to send an HTTPS request with a decrease in the number of shoes by "1". I would be grateful if you share the documentation
Answer the question
In order to leave comments, you need to log in
detailed documentation on HTTPS request from 1C
All the documentation you need is in the syntax helper. The difference between an HTTP request and HTTPS is only in the seventh parameter for the connection constructor (the request object itself is the same). If you are using your own local certificate, you must specify it in the constructor for the OpenSSL SecureConnection, otherwise use the default constructor. Usually, third-party web services provide a certificate themselves and do not need to bother with it. Here is an example code with ITS:
Вывод = "Тест HTTPS с без параметров" + Символы.ПС;
Защита = Новый ЗащищенноеСоединениеOpenSSL();
Соединение = Новый HTTPСоединение(Адрес,,,,,,Защита);
Запрос = Новый HTTPЗапрос();
Ответ = Соединение.Получить(запрос);
Если Ответ <> Неопределено Тогда
Вывод = Вывод + Ответ.ПолучитьТелоКакСтроку();
Иначе
Вывод = Вывод + "Ничего не вернулось!"
КонецЕсли;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question