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.
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.comCurrent Behavior
The
USPSclass constructor only acceptsclientId,clientSecret, and useTitleCase parameters. ThebaseUrlproperty is hardcoded as areadonlyfield:This means all API calls (OAuth token generation, address validation, city/state lookup) always target the production environment, even during development and testing.