Using the configuration property networkSettings, you can set request headers for all outgoing HTTP connections of PDFreactor, used to load the document and its resources like images and style sheets. Similarly, it can be used to specify cookies as well as authentication credentials
Java
config.setNetworkSettings(new NetworkSettings() .setRequestHeaders(new KeyValuePair("User-Agent", "PDFreactor")) .setCookies(new KeyValuePair("name", "Peter")) );
C#
config.NetworkSettings = new NetworkSettings { RequestHeaders = new List<KeyValuePair> { new KeyValuePair("User-Agent", "PDFreactor") }; Cookies = new List<KeyValuePair> { new KeyValuePair("name", "Peter") } };
PHP
$config["networkSettings"] = [ "requestHeaders" => [[ "key" => "User-Agent", "value" => "PDFreactor" ]], "cookies" => [[ "key" => "name", "value"=> "Peter" ]] ];
JavaScript/Node.js
config.networkSettings = { requestHeaders: [{ key: "User-Agent", value: "PDFreactor" }], cookies = [{ key: "name", value: "Peter" }] };
Python
config["networkSettings"] = { "requestHeaders": [{ "key": "User-Agent", "value": "PDFreactor" }], "cookies": [{ "key": "name", "value": "Peter" }] }
Ruby
config["networkSettings"] = { "requestHeaders": [{ key: "User-Agent", value: "PDFreactor" }], "cookies": [{ key: "name", value: "Peter" }] }
REST
{ "networkSettings": { "requestHeaders": [{ "key": "User-Agent", "value": "PDFreactor" }], "cookies": [{ "key": "name", "value": "Peter" }]} }
This functionality can be used to pass a session ID from the integration to PDFreactor.