linslin/Yii2-Curl

我要怎么关闭上面那个curl获取的json

ruikc opened this issue · 3 comments

ruikc commented

$curl = new curl\Curl();
$response = $curl->get('http://example.com/');

$response 是json字符串,这个是返回,为什么会又直接输出个json到console里面,我现在用ajax,
正常应该返回{"status":1,"msg":"验证码发送成功"},为什么现在是
{"reason":"操作成功","result":{"sid":"","fee":1,"count":1},"error_code":0}{"status":1,"msg":"验证码发送成功"},我要怎么关闭上面那个curl获取的json

English please.

ruikc commented

$curl = new curl\Curl();
$response = $curl->get('http://example.com/');
i want to response "{"status":1,"msg":"验证码发送成功"}",
but response "{"reason":"操作成功","result":{"sid":"","fee":1,"count":1},"error_code":0}{"status":1,"msg":"验证码发送成功"}",
how can i disabled the curl result like "{"reason":"操作成功","result":{"sid":"","fee":1,"count":1},"error_code":0}",tk you

This is no issue releated to Yii2-Curl. Results / Payloads were responded by the server you are calling.