npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vee-http

v0.1.1

Published

RxJS Http Client for Vue

Readme

Vue3 HTTP Client using RxJS

Table of Contents

Features

  • [X] XMLHttpRequests from the browser
  • [X] Supports the rxjs API
  • [X] Intercept requests and responses globally
  • [X] Supports both Options and Composition API
  • [X] Full Typescript support
  • [X] Can be used as a plugin for Vue

Install

install using npm

npm install vee-http

Usage

import createApp from 'vue';
import App from 'vue/App';
import createVHttpClient from 'v-http';

const app = createApp(App)
app.use(createVHttpClient())

Options API

You can access the client via the registered globals

export default createComponent({
    data() {
        names: []
    },
    beforeMount() {
        this.$vHttpClient.get('my.api-server.com/endpoint')
            .subscribe(endpointData => this.name = endpointData)
    }
})

Composition API

const {http} = useVHttpClient();

updateItem(item: {id: string, value: string}) {
    http.put('http://my-item.server./items/' + item.id, item, {
        queryParams: {full: 'true'}
    })
        .pipe(
            map(res => true),
            catchError(e => {
                if (e.status === 404) {
                    console.error(`item ${ id } does not exist!`);
                    return EMPTY;
                }
            }) 
        )
        .subscribe(res => console.log(`item ${ id } updated!`))
}

Interceptors

Interceptors are chained in the order that they are passed to the array. They're useful for global level settings, like authentication headers, caching and logging.

// you can use the interceptor to intercept responses
// by using the rxjs pipe operator
function loggerInterceptor(req, next) {
    const start = performance.now();
    return next(req)
        .pipe(
            tap(_ => console.log(`request executed in ${performance.now() - start}`))
        );
}

// or you can use the interceptors to 
// change the request
function authInterceptor(req, next) {
    const updatedReq = {
        ...req,
        headers: {
            ...req.headers,
            'Authorization': 'Basic [token]'
        }
    };
    
    return next(updatedReq);
}

const interceptors = [
    loggerInterceptor,
    authInterceptor,
]


app.use(createVHttpClient(interceptors))

Promises

All the calls can be converted to promises using the lastValueFrom (or firstValueFrom) operator.

The caveat here is that this has to be the first interceptor in the chain and the types have to be coerced into Promises.

import lastValueFrom from 'rxjs/operators';

async function loggerInterceptor(req, next): Promise<unknown> {
    const start = performance.now();
    const res = await lastValueFrom(next(req))
    console.log(`request executed in ${performance.now() - start}`)
    return res;
}

Docs

for more details please see the documentation

Build

npm run build

If you wish to test the package locally use

npm run build:local

Warning

Library is under active development and may have API breaking changes for subsequent major versions after 1.0.0.