W
W
WalkersRei2018-05-01 23:32:59
1C
WalkersRei, 2018-05-01 23:32:59

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

2 answer(s)
K
Konstantin Nagibovich, 2018-05-02
@nki

detailed documentation on HTTPS request from 1C

It's too much. You need a website API that will receive information about the balance of goods from 1C.
If you have some kind of standard CMS, then you can take such modules for exchange ready-made or write such an exchange yourself.

D
Dmitry Kinash, 2018-05-02
@Dementor

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Запрос();
Ответ = Соединение.Получить(запрос);

Если Ответ <> Неопределено Тогда
  Вывод = Вывод + Ответ.ПолучитьТелоКакСтроку();
Иначе
  Вывод = Вывод + "Ничего не вернулось!"
КонецЕсли;

PS Another moment I remembered, if your HTTPS service is not on the standard port 443, then it must be explicitly specified in the second parameter. For example: HTTPConnection(Address, 1443,,,,,New SecureConnectionOpenSSL()).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question