OAuth, PHP, Rest API and curl gives 400 Bad Request

前端 未结 1 1944
死守一世寂寞
死守一世寂寞 2021-01-16 08:17

We got a couple of apps, utilizing the car2go Rest-API with OAuth 1.0.

All our web apps stopped working 2 days ago. All curl POST requests

1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-16 09:01

    Ok, this is what fixed this nightmare:

    curl_setopt($ch,CURLOPT_HTTPHEADER ,array('Content-Length: 0'));
    

    Aparrently it's not ok to send a curl POST without a header.

    0 讨论(0)
提交回复
热议问题