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
{{ message }}
Repository navigation
Runtime APIs: support MIMEType.parse() from node:util #7663
import{MIMEType}from'node:util';// A simple polyfillMIMEType.parse??=(string)=>{try{returnnewMIMEType(string);}catch{returnnull;}};exportdefault{fetch(request){// ...// No need to handle parse error hereif(MIMEType.parse(request.headers.get('Content-Type'))?.essence!=='application/x-www-form-urlencoded'){returnResponse.json({message: 'Content-Type not application/x-www-form-urlencoded',},{status: 400});}// ...},};
changed the title [-]Runtime APIs: support `MIMEType.parse()` from `node:utils`[/-][+]Runtime APIs: support `MIMEType.parse()` from `node:util`[/+]on Oct 8, 2026
Activity
[-]Runtime APIs: support `MIMEType.parse()` from `node:utils`[/-][+]Runtime APIs: support `MIMEType.parse()` from `node:util`[/+]