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

rex-requestajax

v0.0.4

Published

REquest ajaX client get and post for connecting to the API/Web Service Host

Downloads

23

Readme

rex / REquest ajaX

REquest ajaX client get and post for connecting to the API/Web Service Host

Installing

nodejs via npm

npm install rex-requestajax

html via vanilla js

clone/download

add /mod/frontend/vanilla/rex.js to your html script 
or add vanilla/rex.js file to your lib web doc for use the script 

How To Use

0. Require

nodejs

const rex = require('rex-requestajax');

html

//add in your html head tag
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> //need jquery for running rex.js
<script src="./mod/frontend/vanilla/rex.js"></script> //add vanilla/rex.js file to your lib web doc for use the script 

//see sample.html for implementation

1. Must define API/Web Service Host

Create Instance API/Web Service Host

const request = new rex("API/Web Service Host");
//const request = new rex("https://randomuser.me/api/")

2. You can set arguments for Prerequisite API/Web Service Host and set context for 'this' object after get result

const context = this; //'this' is default object you can change with another object;
cons argument = {a:"sdf"};

const request = new rex("API/Web Service Host")
                .setContext(context)
                .setArgs(argument);

3. Define request type .get (for get data) or .post (for transaction data)

GET

cons argument = {a:"sdf"};
const request = new rex("API/Web Service Host");

request.get();

//you also can add argument in .get chain method                
request.get(argument);

POST

cons argument = {a:"sdf"};
const request = new rex("API/Web Service Host");

request.post();

//you also can add argument in .post chain method                
request.post(argument);

4. Handle result data with define .done() / .fail() / .final()

.done handle for successfull request

.done(function(ret){				
    console.log(ret);
    
})

.fail handle for fail request

.fail(function(ret){				
    console.log(ret);
    
})

.final handle is always run after successfull request or fail request

.done(function(ret){				
    console.log(ret);
    
})
.fail(function(ret){				
    console.log(ret);
    
})
.final(function(ret){				
    console.log(ret);
    
})

More API/Web Service Host

You can change the request API/Web Service Host

request.setWebhost("new API/Web Service Host");

Or You can create new Instance again and follow point 1 is up to you then follow back point 2/3/4