You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -94,7 +94,7 @@ export async function apiResolver(
94
94
95
95
if(contentLength>=4*1024*1024){
96
96
console.warn(
97
-
`API response for ${req.url} exceeds 4MB. This will cause the request to fail in a future version. https://nextjs.org/docs/messages/api-routes-body-size-limit`
97
+
`API response for ${req.url} exceeds 4MB. This will cause the request to fail in a future version. https://nextjs.org/docs/messages/api-routes-body-size-limit`,
98
98
)
99
99
}
100
100
@@ -127,7 +127,7 @@ export async function apiResolver(
127
127
!wasPiped
128
128
){
129
129
console.warn(
130
-
`API resolved without sending a response for ${req.url}, this may result in stalled requests.`
130
+
`API resolved without sending a response for ${req.url}, this may result in stalled requests.`,
131
131
)
132
132
}
133
133
}catch(err){
@@ -156,7 +156,7 @@ export async function apiResolver(
156
156
*/
157
157
exportasyncfunctionparseBody(
158
158
req: IncomingMessage,
159
-
limit: string|number
159
+
limit: string|number,
160
160
): Promise<any>{
161
161
letcontentType
162
162
try{
@@ -234,7 +234,7 @@ export function getCookieParser(headers: {
234
234
*/
235
235
exportfunctionsendStatusCode(
236
236
res: NextApiResponse,
237
-
statusCode: number
237
+
statusCode: number,
238
238
): NextApiResponse<any>{
239
239
res.statusCode=statusCode
240
240
returnres
@@ -249,15 +249,15 @@ export function sendStatusCode(
`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`
260
+
`Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`,
261
261
)
262
262
}
263
263
res.writeHead(statusOrUrl,{Location: url})
@@ -275,7 +275,7 @@ export function redirect(
275
275
exportfunctionsendData(
276
276
req: NextApiRequest,
277
277
res: NextApiResponse,
278
-
body: any
278
+
body: any,
279
279
): void{
280
280
if(body===null||body===undefined){
281
281
res.end()
@@ -291,7 +291,7 @@ export function sendData(
291
291
if(process.env.NODE_ENV==="development"&&body){
292
292
console.warn(
293
293
`A body was attempted to be set with a 204 statusCode for ${req.url}, this is invalid and the body was ignored.\n`+
294
-
`See more info here https://nextjs.org/docs/messages/invalid-api-status-body`
294
+
`See more info here https://nextjs.org/docs/messages/invalid-api-status-body`,
0 commit comments