Столкнулся с такой задачей:
Есть некий сервис на который нужно послать защищенный POST запрос, все мои попытки его выполнить не увенчались успехом.
Показываю как пробовал:
PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- $body = 'some content';
- // initializing cURL with the API URL:
- // setting the request type to POST:
- // setting the content type:
- // setting the authorization method to BASIC:
- // supplying your credentials:
- // filling the request body with your SOAP message:
- // configuring cURL not to verify the server certificate:
- // setting the path where cURL can find the client certificate:
- // setting the path where cURL can find the client certificate’s
- // private key:
- // setting the key password:
- // closing cURL: