guzzle

    0

    4

    Codiga Fan #24465

    The code above sends a POST request to the http://www.example.com/user/create page. The form_params variable contains the data that will be sent with the POST request. The email and name fields are required, while the password field is optional.

    $client = new \GuzzleHttp\Client();
    $client->post(
      'http://www.example.com/user/create',
      array(
        'form_params' => array(
          'email' => 'test@gmail.com',
          'name' => 'Test user',
          'password' => 'testpassword'
        )
      )
    );
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.