Skip to content

Commit

Permalink
Update cloudflare-worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
barretlee authored Apr 6, 2023
1 parent 1e7c2f6 commit a7cf8ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudflare-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function handleRequest(request) {
// 在 Cloudflare 中,HEAD 和 GET 请求带 body 会报错
if (['HEAD', 'GET'].includes(request.method)) delete payload.body;

// 入参中如果包含了 stream=true,则表现形式为非流式输出
// 入参中如果包含了 stream=true,则表现形式为流式输出
const response = await fetch(fetchAPI, payload);
if (body && body.stream !== true) {
const results = await response.json();
Expand Down

0 comments on commit a7cf8ec

Please sign in to comment.