Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    phillmac
    @phillmac
    Seems like there was a name change for some reason
    so it should be compatible. as to the benefits i guess there's nothing like a good 'ol benchmark
    still-dreaming-1
    @still-dreaming-1
    I'm still confused though. Are you saying just installing it will cause it to be used by Guzzle, and could potentially affect performance?
    I installed Guzzle 6.5, since that is what got installed by default (since 7 is still beta), and 6.5 is still recommending the old zend library, which makes me even more unsure of if the new one would be compatible with 6.5
    phillmac
    @phillmac
    Fair enough, I wouldn't worry about it, you can read some of the back story here guzzle/psr7#204
    If you don't know what it's for, you prolly don't need it
    still-dreaming-1
    @still-dreaming-1
    Hmm. From that is seems like it doesn't matter at all unless I am making an HTTP server. I'm only using Guzzle as a client to communicate with a server, so I guess I don't need to worry about it.
    phillmac
    @phillmac
    Seems that way to me too
    still-dreaming-1
    @still-dreaming-1
    Cool thanks
    still-dreaming-1
    @still-dreaming-1
    I'm having hard time understanding enough to put a request together for alpaca where it uses my API key for authentication. Here is an example of what I'm wanting to do if it were done with curl from a terminal: curl -X GET \ -H "APCA-API-KEY-ID: {YOUR_API_KEY_ID}" \ -H "APCA-API-SECRET-KEY: {YOUR_API_SECRET_KEY}"\ https://{apiserver_domain}/v2/account
    You can see the example better here: https://alpaca.markets/docs/api-documentation/api-v2/
    It's under the authentication heading
    phillmac
    @phillmac
    still-dreaming-1
    @still-dreaming-1
    Hmm, yeah looks like that should do what I want pretty simply. I was looking at the stuff for constructing the client prior to making the request.
    phillmac
    @phillmac
    $client = new GuzzleHttp\Client(['headers' => ['X-Foo' => 'Bar']]);
    If you wanna do it that way rather then per request
    still-dreaming-1
    @still-dreaming-1
    Okay, I guess I was just over complicating it somehow. I will try it
    still-dreaming-1
    @still-dreaming-1
    Hmm. I'm getting an error from Curl. I wonder if I even have curl? I'm on Windows 10. My use case is very abnormal. I'm not running code from a server or for a website, it is just a desktop GUI application running on my computer.. Do you know how I would check if I have curl available to Guzzle?
    Looks like it is enabled in my php
    So I guess I have curl
    still-dreaming-1
    @still-dreaming-1
    It's working! I had to download CA certificates, and set the path of the file on my php.ini for the curl settings. My code is downloading stuff from the Alpaca API now!
    rpicheta
    @rpicheta
    Hi all! Is there any way to set base_uri in different way than pass it thru constructor?
    DiegoFSFlor
    @DiegoFSFlor

    $eachPromise = new EachPromise($promises, [
    'concurrency' => 2,
    'fulfilled' => function (Response $response) {
    if ($response->getStatusCode() == 200) {
    $data = json_decode($response->getBody(), true);
    // processing response of user here
    echo "successes";
    }
    },
    'rejected' => function ($reason) {
    echo "fail";
    }
    ]);

    is there any way for each promise to execute Cade sends after a few seconds?
    For example, at concurrency you have informed 2, so it will send every 2 times, and put a time that after 5 seconds it sends again, similar to a pause at each sending.

    Quiec
    @Quiec
    Hi I have a problem
    GuzzleHTTP converting url to capital letters
    Quiec
    @Quiec
    CURLE_URL_MALFORMAT
    Edgar Ibrahimov
    @eibrahimov
    Hi all,
    I use Guzzle to authentication https://auth.prestashop.com/login with method POST and params email, password, and SubmitLogin.
    Before POST request I need also add to here hidden _token params getting from the first request by the GET method to this link. How I can do it with the best practice? Thank you
    Arne Groskurth
    @arnegroskurth
    Does anyone know if I can extract the complete HTTP message that is actually send over the wire for both PSR7 request- and response-objects?
    Without writing that myself...
    Arne Groskurth
    @arnegroskurth
    FYI: \GuzzleHttp\MessageFormatter
    Mario Bonito
    @elite6adger
    Hi everyone, just have some issues with concurrency and Digest Authorization. Using Guzzle 6 anyone been successful with that? When I do it one at a time I have no issues, but when I set up a Pool and try concurrent all the request promises fail with 401. I am passing all the credentials correctly and setting the 'auth' in the request. Thoughts?
    Alexander Tarkhov
    @tarkhov
    Hi guys, I present the second release of the Guzzle XML PHP library for sending XML requests. https://github.com/tarkhov/guzzle-xml/releases/tag/v0.1.1
    hershkoy
    @hershkoy

    Is it possible to run Guzzle as a standalone, without laravel? I am getting this error:

    GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host

    I can ping the host from the server. curl to same address also works. Any way to fix this?

    Carine93
    @Carine933_twitter

    what is this? example:

    composer upgrade guzzlehttp/guzzle
    Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.

    composer remove guzzle/guzzle
    guzzle/guzzle is not required in your composer.json and has not been removed

    phillmac
    @phillmac
    @Carine933_twitter The guzzle package got renamed. You should use the new name iff possible
    Carine93
    @Carine933_twitter
    But what should I do? I can't remove guzzle/guzzle. "guzzle/guzzle is not required in your composer.json and has not been removed" and "Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead."
    I have ofcourse VPS, 755, user/group=www-data/www-data
    phillmac
    @phillmac
    @Carine933_twitter If you're just typing to install something and everything is working then there is no problem and you can safely ignore the warning. If you are a developer and you use guzzle as a dependency then you should look at updating the dependency
    Cutye
    @SrGutyerrez_twitter
    Hello, why guzzle doesn't execute curl requests in localhost? That's make an infinite request
    Zachary Smith
    @zachisit
    Hi all. When I send a POST request with Guzzle, it returns the response but as an HTML and not json if the response returns an error. For successful responses it is a json response. Am I doing something wrong?
    $this->client = new Client(['base_uri' => $this->returnBaseUrl()]);
    $this->response = $this->client->request($this->method,$this->returnRequestURI(),$this->buildRequest());
    phillmac
    @phillmac
    @zachisit its possible that this is the server's fault rather then your fault
    If the server is configured whith only default error messages, it's likeley that they are static html rather then json
    Abdallah Alkahlout
    @wecaod_gitlab
    Hi dears , i want to call a thousand request in guzzle once time and ensure each callback correct
    how i can do that
    Alexander Tarkhov
    @tarkhov
    hey guys Guzzle XML library released with Guzzle 7 support, send xml request and response only by passing array as option which is automatically transformed into xml https://github.com/tarkhov/guzzle-xml
    Diego Gullo
    @bizmate

    Hi dears , i want to call a thousand request in guzzle once time and ensure each callback correct

    https://www.bizmate.biz/news/it-articles/multiple-concurrent-guzzle-requests/

    Avinash Dalvi
    @aviboy2006
    Hello i need to know is it possible to create promise for custom function without end point. By using local function calls ?
    Nikolay Deriglaozov
    @nkl90
    Hello! How to describe nested entities in DSP?