Coldfusion component that use cURL command.
Compatibility CF10+
req = new cURL('http://httpbin.org/get');
res = req.exec();
res = new cURL('http://httpbin.org/get')
.exec();
.method(m): defaultGET.header(name, value).headers({ name = value, ... }).body(any).file(path): file to attach..field(name, value).fields(struct).multipart(true|false): defaultfalse.basicAuth(user, password).json(): add headerapplication/jsonand serialize fields..head(): head only..timeout(sec).output(path).insecure(true|false).commandPath(command): custom command path.addArg(string).trace(true|false): defaulttrue.useOutputTmpFile(true|false).command(): show the command generated..exec(true|false): execute the command and return the request and response parsed. Defaultfalse. Iftrue, it return all calls.
Return of .exec().
- request
- sections: headers, ...
- response
- header
- data
- status
- code
- line