我遇到了一个问题,问题是: #Write a script that uses a web API to create a social media post.#POST / with x-api-key:tweetbotkeyv1 and data with user tweetbotuser and a status-update of alientest我的代码响应我没有提供x-api-key,但是它在头部。我的代码: #
# Tweet bot API listen
我是PHP新手,我使用Guzzle客户端进行Rest调用,并使用$_SERVER变量添加请求头。
但是在我的请求调用中,有时用户发送一个标头(x-api-key),有时没有报头。当没有在请求中发送标头时,我的PHP抛出一个错误,Notice: Undefined index: HTTP_X_API_KEY in Z:\xampp\htdocs\bb\index.php on line, '