<tfoot id='0mvdo'></tfoot>
<i id='0mvdo'><tr id='0mvdo'><dt id='0mvdo'><q id='0mvdo'><span id='0mvdo'><b id='0mvdo'><form id='0mvdo'><ins id='0mvdo'></ins><ul id='0mvdo'></ul><sub id='0mvdo'></sub></form><legend id='0mvdo'></legend><bdo id='0mvdo'><pre id='0mvdo'><center id='0mvdo'></center></pre></bdo></b><th id='0mvdo'></th></span></q></dt></tr></i><div id='0mvdo'><tfoot id='0mvdo'></tfoot><dl id='0mvdo'><fieldset id='0mvdo'></fieldset></dl></div>
      <legend id='0mvdo'><style id='0mvdo'><dir id='0mvdo'><q id='0mvdo'></q></dir></style></legend>

      • <bdo id='0mvdo'></bdo><ul id='0mvdo'></ul>
    1. <small id='0mvdo'></small><noframes id='0mvdo'>

        PHP GuzzleHttp.如何使用参数进行发布请求?

        PHP GuzzleHttp. How to make a post request with params?(PHP GuzzleHttp.如何使用参数进行发布请求?)

        <legend id='KdtES'><style id='KdtES'><dir id='KdtES'><q id='KdtES'></q></dir></style></legend>

          <small id='KdtES'></small><noframes id='KdtES'>

              <tfoot id='KdtES'></tfoot>
                <tbody id='KdtES'></tbody>

              • <bdo id='KdtES'></bdo><ul id='KdtES'></ul>

                1. <i id='KdtES'><tr id='KdtES'><dt id='KdtES'><q id='KdtES'><span id='KdtES'><b id='KdtES'><form id='KdtES'><ins id='KdtES'></ins><ul id='KdtES'></ul><sub id='KdtES'></sub></form><legend id='KdtES'></legend><bdo id='KdtES'><pre id='KdtES'><center id='KdtES'></center></pre></bdo></b><th id='KdtES'></th></span></q></dt></tr></i><div id='KdtES'><tfoot id='KdtES'></tfoot><dl id='KdtES'><fieldset id='KdtES'></fieldset></dl></div>
                  本文介绍了PHP GuzzleHttp.如何使用参数进行发布请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何使用 GuzzleHttp(5.0 版)发出 post 请求.

                  How to make a post request with GuzzleHttp( version 5.0 ).

                  我正在尝试执行以下操作:

                  I am trying to do the following:

                  $client = new GuzzleHttpClient();
                  $client->post(
                      'http://www.example.com/user/create',
                      array(
                          'email' => 'test@gmail.com',
                          'name' => 'Test user',
                          'password' => 'testpassword'
                      )
                  );
                  

                  但我收到错误:

                  PHP 致命错误:未捕获的异常InvalidArgumentException",消息为No method can handle the email config key"

                  PHP Fatal error: Uncaught exception 'InvalidArgumentException' with the message 'No method can handle the email config key'

                  推荐答案

                  试试这个

                  $client = new GuzzleHttpClient();
                  $client->post(
                      'http://www.example.com/user/create',
                      array(
                          'form_params' => array(
                              'email' => 'test@gmail.com',
                              'name' => 'Test user',
                              'password' => 'testpassword'
                          )
                      )
                  );
                  

                  这篇关于PHP GuzzleHttp.如何使用参数进行发布请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                  <i id='Wyidl'><tr id='Wyidl'><dt id='Wyidl'><q id='Wyidl'><span id='Wyidl'><b id='Wyidl'><form id='Wyidl'><ins id='Wyidl'></ins><ul id='Wyidl'></ul><sub id='Wyidl'></sub></form><legend id='Wyidl'></legend><bdo id='Wyidl'><pre id='Wyidl'><center id='Wyidl'></center></pre></bdo></b><th id='Wyidl'></th></span></q></dt></tr></i><div id='Wyidl'><tfoot id='Wyidl'></tfoot><dl id='Wyidl'><fieldset id='Wyidl'></fieldset></dl></div>

                    <tfoot id='Wyidl'></tfoot>

                    <small id='Wyidl'></small><noframes id='Wyidl'>

                      • <bdo id='Wyidl'></bdo><ul id='Wyidl'></ul>
                        <legend id='Wyidl'><style id='Wyidl'><dir id='Wyidl'><q id='Wyidl'></q></dir></style></legend>

                              <tbody id='Wyidl'></tbody>