cURL错误3:<url>格式错误

时间:2018-05-24 13:57:49

标签: laravel-5 guzzle

请我在.env文件中存储端点的BASE URL并在我的控制器中调用此端点。 当我这样做时:

$request = $client->get(env('URI').'/positions');

我收到此错误 - cURL错误3:格式错误

但是当我这样做时 -

$url = env('URI');
$request = $client->get($url.'/positions');

有效。这可能是什么问题?

1 个答案:

答案 0 :(得分:2)

我通过运行

解决了
#!/bin/bash

# Get the list of files
fileslist=$(find . -name "relsendTest*.csv" -print)

# The header of the output.csv is the first line of the first file in the list
head -1 $(echo $fileslist | awk '{print $1}') > output.csv

# Then loop on each file and get all lines except the first line of each file
for F in $fileslist
do
    sed 1d $F >> output.csv
done

php artisan config:clear