If you are using, for example, the httpget adapter, you can place this in EITHER the JSON job spec, OR you can add it to your smart contract code.
Here is an example of a smart contract using the req.add
feature:
// Creates a Chainlink request with the bytes32 job and returns the requestId
function requestEthereumLastMarket(bytes32 _jobId) public returns (bytes32 requestId) {
// newRequest takes a JobID, a callback address, and callback function as input
Chainlink.Request memory req = buildChainlinkRequest(_jobId, address(this), this.fulfillEthereumLastMarket.selector);
// Adds a URL with the key "get" to the request parameters
req.add("get", "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&tsyms=USD");
// Adds a dot-delimited JSON path with the key "path" to the request parameters
req.add("path", "RAW.ETH.USD.LASTMARKET");
// Sends the request with 1 LINK to the oracle contract
requestId = sendChainlinkRequest(req, 1 * LINK);
}
The req.add basically adds these parameters to the json spec of that job instance. If you have both the json job spec AND the smart contract defining the http.get adapter, the job spec will override the smart contracts.