Nevertheless! Party Metaphorically

    @quanxiaoxiao/about-http

    0.1.6 • Public • Published

    about-http

    Install

    npm install @quanxiaoxiao/about-http

    Usage

    import { httpConnect, httpForward , fetchData, receiveData, receiveJSON } from 'about-http';
    // httpForward(options, httpResponse)
    // httpConnect(options, { onError, onResponse, onData, onEnd, onClose })
    // fetchData(options)
    // receiveData(httpRequest, limit)
    // receiveData(httpRequest, limit = 3MB)
    // connectWebSocket(options, httpRequest, socket)

    options

    server.on('upgrade', (req, socket) => {
      if (req.url === '/ws') {
        connectWebSocket({
          url: 'wss://quan/ws',
        }, req, socket);
      } else {
        socket.destroy();
      }
    });

    Keywords

    none

    Install

    npm i @quanxiaoxiao/about-http

    DownloadsWeekly Downloads

    36

    Version

    0.1.6

    License

    ISC

    Unpacked Size

    34.1 kB

    Total Files

    15

    Last publish

    Collaborators

    • quanxiaoxiao