Skip to content

zalter-com/http2-client-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@zalter/http2-client-node

An internal package

Usage

import { Client } from '@zalter/http2-client-node';

const client = new Client();
const response = await client.request('https://domain.example', {
  headers: {
    ':method': 'GET',
    'content-type': 'application/json'
  },
  body: JSON.stringify({ name: 'John' })
});

const data = response.body; // Buffer
console.log(`Received response status: ${response.headers[':status']}`);