0.0.4 • Published 3 years ago

intrx v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

intrx

Rxjs based tinny HTTP client for the browser.

Features

Make XMLHttpRequests from the browser Supports the rxjs Intercept request and response unsubscribe requests

Used

import intrx from 'intrx'

examples

// GET method ajax
const intrxSub$: Subscription = intrx.get('/test/url')
     .subscribe(
        res => console.log(res),
        err => console.log(err),
        () => { console.log('complete');}
     )
// cencel
intrxSub$.unsubscribe();

Interceptor( Like axios )

intrx.interceptors.reqInterceptor(function (config) {
    config.headers['XREQ'] = 'V';
    return config;
})
intrx.interceptors.resInterceptor({
    next: (data) => {
        data.v = '3123';
        return data;
    }
})
0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago