-
-
Notifications
You must be signed in to change notification settings - Fork 689
Labels
bugSomething isn't workingSomething isn't working
Description
Consider the following:
import { request, fetch, Agent, Client, setGlobalDispatcher } from './index.js'
setGlobalDispatcher(new Agent({
allowH2: true
}))
// Not working as expected
// the request is done using HTTP/1.1
const res1 = await fetch(`https://http2.pro/api/v1`)
console.log(await res1.json())
// Not working as expected, the response is never received
const client = new Client('https://http2.pro', {
allowH2: true
})
const res2 = await request(`https://http2.pro/api/v1`, { dispatcher: client })
console.log(await res2.body.json())ShenHongFei
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working