Registry / devops / oasi-rest

oasi-rest

JSON →
library1.0.10jsnpmunverified

OASI REST provides REST service utilities for JavaScript/Node.js applications. Version 1.0.10 is the latest stable release. The package is designed for use with Bower and requires a bower-npm-resolver plugin for installation. It differentiates itself through simple integration with Bower projects and focuses on REST service abstractions.

npm install oasi-rest
INSTALL
IMPORT
SIG · OASI-REST
O
oasi-rest
devopsjavascriptv1.0.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OasiRest
import OasiRest from 'oasi-rest'
const OasiRest = require('oasi-rest')
Package is distributed as an ESM module; do not use CommonJS require.
RestService
import { RestService } from 'oasi-rest'
const RestService = require('oasi-rest').RestService
Named export, available only via ESM import or destructured require (though require is discouraged).
createClient
import { createClient } from 'oasi-rest'
Creates a REST client instance. Available as a named export since v1.

Shows how to import OasiRest, create a client with a base URL, and make a GET request.

import OasiRest from 'oasi-rest'; const api = new OasiRest({ baseURL: 'https://api.example.com' }); api.get('/users').then(response => console.log(response.data));
Debug
Known issues
gotchaPackage requires bower-npm-resolver plugin for Bower installation; direct npm install may not work.
fix
Install bower-npm-resolver and configure .bowerrc as shown in README.
affects: >=1.0.0
breakingImport should be ESM; CommonJS require may cause errors or unexpected behavior.
fix
Use import statement instead of require.
affects: >=1.0.0
deprecatedBower support is deprecated; migration to npm/yarn is recommended.
fix
Migrate to npm/yarn and update imports accordingly.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'oasi-rest'
Package not installed via Bower with bower-npm-resolver or not built correctly.
fix
Follow README instructions: configure .bowerrc, add dependency in bower.json, and run bower i.
Uncaught ReferenceError: OasiRest is not defined
Using CommonJS require instead of ESM import.
fix
Change const OasiRest = require('oasi-rest') to import OasiRest from 'oasi-rest'.
Upgrade
Version history
1.0.10latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
oasi-rest — npm install oasi-rest · libregistry