guzzle6

    1熱度

    1回答

    使用狂飲6,我已經測試泳池/無極異步用下面的代碼: $client = new \GuzzleHttp\Client(); $urls = []; for($i = 1; $i<10; $i++) { $urls[] = ''https://httpbin.org/get?id='.$i; } $requests = function ($u

    2熱度

    1回答

    我拿到的時候我在做一個POST請求以下錯誤: Client error: POST http://api.hitbox.tv/auth/login resulted in a 400 Bad Request response: {"success":true,"error":false,"error_msg":"auth_failed"} 我不知道,是因爲我有什麼毛病我狂飲代碼 require '

    0熱度

    1回答

    它總是錯誤地說出2條消息之一。 {"message":"Required field 'specList' is not specified"}或者如果我添加specList然後它說'400 Bad Request' response: {"message":"Can not deserialize instance of java.util.ArrayList out of VALUE_STRI

    1熱度

    1回答

    我想通過使用GuzzleHttp \ Psr7 \ Request發送代碼,不知何故,我得到錯誤無效的資源類型:array,以下是我的代碼 $params = ["name"=>"myName","id"=>"myId"]; $client = new Client(); $request = new Request('PUT','https://api.hitbox.tv/media/liv

    2熱度

    2回答

    在Google Oauth2實現中,我試圖使用guzzle調用來交換令牌的授權代碼。 下狂飲調用工作正常,返回預期值: $result = $this->client->post( 'https://www.googleapis.com/oauth2/v3/token?code=<authorization_code>&redirect_uri=<redirect_uri>&client

    0熱度

    1回答

    我正在使用"guzzlehttp/guzzle": "~6.0"並嘗試使用下面的代碼github用戶。 $client = new \GuzzleHttp\Client(); $request = $client->createRequest('GET', 'https://api.github.com/users'); $query = $request->getQuery(); $qu

    6熱度

    1回答

    我想用Guzzle下載一個大文件並想跟蹤進度。我不知道是否必須通過流或使用RequestMediator。 我嘗試訂閱事件curl.callback.progress,但PSR 7請求沒有事件分派器。 我試過on_stats,但回調只在最後被解僱。 進度用戶插件已經過時https://github.com/guzzle/progress-subscriber 我測試下面的代碼。 $dl = 'ht

    10熱度

    4回答

    任何人都可以解釋如何在Guzzle中添加授權標頭?我可以看到下面的作品的代碼添加用戶名&密碼,但在我的情況下我只想補充Authorization頭本身 $client->request('GET', '/get', ['auth' => ['username', 'password'] 基本Authorization頭我想添加到我的GET請求: - Basic aGdkZQ1vOjBmNmFm

    0熱度

    1回答

    我嘗試使用GuageHttp和Magento來更新我的產品目錄。 我用池請求以從數據庫中的數據,我試圖把它們上傳到Magento的trought API $apiUrl = 'http://xxx.xxxxx.xxx'; $middleware = new Oauth1([ 'consumer_key' => '-------------------------------',

    1熱度

    1回答

    當前捲曲格式 curl -v --cookie "JSESSIONID=xxxxxxxxx" -X POST --data "[\"test\",\"password\"]" http://domain.com/register 如何驗證cookie的&使用後狂飲的數據? $url = 'http://domain.com/register'; $client = new GuzzleHtt