Registry / devops / rest-api-support

rest-api-support

JSON →
library2.0.0-beta.10jsnpmunverified

URL manipulation and support infrastructure for REST API calls, currently at version 2.0.0-beta.10. Provides utilities for constructing and normalizing URLs, handling query parameters, and managing REST API request infrastructure. Primarily developed by GasBuddy for internal use, with TypeScript support and a focus on URL manipulation patterns. The package is in beta and may have breaking changes before stable release.

npm install rest-api-support
INSTALL
IMPORT
SIG · REST-API-SUPPORT
R
rest-api-support
devopsjavascriptv2.0.0-beta.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.

URLBuilder
import { URLBuilder } from '@gasbuddy/rest-api-support'
const URLBuilder = require('@gasbuddy/rest-api-support').URLBuilder
ESM only; CommonJS require may break in some bundlers.
default
import RestApiSupport from '@gasbuddy/rest-api-support'
const RestApiSupport = require('@gasbuddy/rest-api-support')
The default export is not clearly documented; prefer named imports.
Module
import * as RestApiSupport from '@gasbuddy/rest-api-support'
const RestApiSupport = require('@gasbuddy/rest-api-support')
Namespace import works for accessing all exports.

Demonstrates building a URL using URLBuilder, setting path and query parameters.

import { URLBuilder } from '@gasbuddy/rest-api-support'; const urlBuilder = new URLBuilder('https://api.example.com'); const url = urlBuilder .setPath('/users') .setQueryParam('id', '123') .build(); console.log(url); // https://api.example.com/users?id=123
Debug
Known issues
breakingVersion 2.0.0-beta introduces breaking changes; URLBuilder may differ from 1.x.
fix
Refer to migration guide on GitHub repository.
affects: >=2.0.0-beta <2.0.0
deprecatedSome older APIs may be deprecated in favor of new patterns.
fix
Check changelog for deprecated symbols.
affects: >=2.0.0-beta
gotchaThe package is pre-release (beta); zero guarantees for stability.
fix
Pin exact version in package.json.
affects: >=2.0.0-beta
Errors
Common errors & fixes
Error: Cannot find module '@gasbuddy/rest-api-support'
Missing npm install or incorrect package name (scoped package requires proper registry).
fix
Run 'npm install @gasbuddy/rest-api-support' and ensure npm registry access.
TypeError: URLBuilder is not a constructor
Importing incorrectly (e.g., using default import when named import required).
fix
Use named import: import { URLBuilder } from '@gasbuddy/rest-api-support'
'URLBuilder' cannot be used as a value because it was exported using 'export type'
Attempting to use a type that is not a runtime value.
fix
Ensure you import runtime symbols; check if URLBuilder is a class or type.
Upgrade
Version history
2.0.0-beta.10latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
rest-api-support — npm install rest-api-support · libregistry