mikebywater / rest-now
一个简单的ServiceNow REST客户端
0.1
2018-09-05 13:59 UTC
Requires
- guzzlehttp/guzzle: ^6.3
- kamermans/guzzle-oauth2-subscriber: ^1.0
- league/climate: ^3.4
- monolog/monolog: ^1.23
Requires (Dev)
- phpunit/phpunit: ^7.3
- squizlabs/php_codesniffer: ^3.3
This package is auto-updated.
Last update: 2024-09-23 10:30:51 UTC
README
通过Composer安装
composer require entanet/rest-now
配置
配置通过配置类完成
$config = new \Now\Client\Config(); $config->base_uri = "https://instance-name.service-now.com"; $config->client_id = '0xx000xxx00'; $config->client_secret = 'client_secret'; $config->username = "my.email@gmail.com"; $config->password = 'secret_password';
可以使用第二个配置类来设置是否启用增量重试,如果是,则设置HTTP最大重试次数和最大延迟秒数值,但是为了确保rest-now不会出错,一些默认值已经包含在某些CONST变量中的auth类中
http_client.incremental_retry_is_active http_client.max_delay_between_retries_in_seconds http_client.max_retries ... ### Authentication