0
Azure関数でリクエストヘッダーを取得するにはどうすればよいですか?私は、リクエストを処理するためにJavaScriptのhttpトリガを使用します。フロントエンドからリクエストヘッダで送られてきたトークンを読む必要があります。これどうやってするの ?azure関数でリクエストヘッダーを取得するNodeJs Http Trigger
module.exports = function (context, req) {
context.log('JavaScript HTTP trigger function processed a request.');
if (true) {
context.log(req.headers['Authorization'])
context.res = {
// status: 200, /* Defaults to 200 */
body: "Hello there "
};
}
else {
context.res = {
status: 400,
body: "Please pass a name on the query string or in the request body"
};
}
context.done();
};
あなたのコードを投稿して、あなたを助けることができますか? – hjm