0

function requestFirstId( string memory _obid) public returns (bytes32 requestId) { Chainlink.Request memory req = buildChainlinkRequest(jobId, address(this), this.fulfill.selector); obj= _obid;

    req.add('get', 'string.concat(https://5fes4djdoxic.usemoralis.com:2053/server/functions/getid?_ApplicationId=yourMoralisAppId&objectId=,obj)');

1 Answer 1

0

I guess your codes are like the below:

function requestFirstId( string memory _obid) public returns (bytes32 requestId) {
    Chainlink.Request memory req = buildChainlinkRequest(jobId, address(this), this.fulfill.selector); 
    obj= _obid;
    req.add('get', 
    'string.concat(https://5fes4djdoxic.usemoralis.com:2053/server/functions/getid?_ApplicationId=yourMoralisAppId&objectId=,obj)');
    }
}

In the function you are trying to add a "string.concatenate" itself as a string instead of using the function to concatenate a string. In this case, you should concatenate the URL first and then pass the string as the second parameter.

Try to concatenate your url like this:

 string url = string.concat('https://5fes4djdoxic.usemoralis.com:2053/server/functions/getid?_ApplicationId=yourMoralisAppId&objectId=', obj);

and then pass the url to the chainlink request:

req.add("get", url);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.