【问题标题】:I can't get request payload when used $auth.signup(user)使用 $auth.signup(user) 时我无法获取请求有效负载
【发布时间】:2015-07-02 22:47:38
【问题描述】:

我在使用 Satellizer api 注册时遇到问题,当在我的后端使用 CodeIgniter 调用方法 $auth.signup(user) 时,我无法检索用户发送的值。

我什么都试过了

我的库 REST 用于选项调用的方法

$this->options('name'); // this is null

link图书馆

我尝试使用此手动获取有效负载

$request_body = file_get_contents('php://input');

$data = json_decode($request_body); //this is null too

我不知道会不会,请帮帮我!

谢谢大家!! 最好的问候。

【问题讨论】:

    标签: php codeigniter codeigniter-restserver satellizer


    【解决方案1】:

    我修好了,解决办法是here

    总而言之,浏览器发送两个请求一个选项来检查服务器是否接受自定义标头,并在请求 POST 后发送数据。

    感谢您的宝贵时间!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-09
      • 2013-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多