Skip to content

kadirahq/lokka-transport-http-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lokka-transport-http-auth

HTTP Auth Transport Layer for Lokka (Works only on the server);


This is an extended version of lokka-transport-http with the basic-auth support.

Basic Usage

Install the package:

npm i --save lokka-transport-http-auth
npm i --save lokka

This is how to send request to Facebook's SWAPI GraphQL Demo.

import HttpTransport from 'lokka-transport-http-auth';
const transport = new HttpTransport('http://user:secret@localhost:8090/path');
transport.send(`
    {
      allFilms {
        films {
          title
        }
      }
    }
`).then(response => {
    console.log(JSON.stringify(response, null, 2));
});

About

HTTP Transport for Lokka with Basic Auth

Resources

License

Stars

Watchers

Forks

Packages

No packages published