Skip to content

Add Support for USPS Testing Environment Endpoint #1

Description

@landerop

Summary

The library currently hardcodes the production USPS API endpoint https://apis.usps.com in src/index.ts:55. To support development and testing workflows, the library should allow developers to optionally use the USPS Testing Environment endpoint https://apis-tem.usps.com

Current Behavior
The USPS class constructor only accepts clientId, clientSecret, and useTitleCase parameters. The baseUrl property is hardcoded as a readonly field:

readonly baseUrl = 'https://apis.usps.com'

This means all API calls (OAuth token generation, address validation, city/state lookup) always target the production environment, even during development and testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions