ClientOptions
Settings for a PostcodeClient. Each one is optional.
Properties
Section titled “Properties”apiKey?
Section titled “apiKey?”
readonlyoptionalapiKey?:string
The key for the X-API-Key header. With no key, the client sends no header.
baseUrl?
Section titled “baseUrl?”
readonlyoptionalbaseUrl?:string
The gateway’s address. The default is https://api.postcode.gov.ng.
cacheTtlMs?
Section titled “cacheTtlMs?”
readonlyoptionalcacheTtlMs?:number
How long the client keeps a result, in milliseconds. The default 0 turns the cache off.
maxRetries?
Section titled “maxRetries?”
readonlyoptionalmaxRetries?:number
The most retries after the first attempt. The default is 2.
timeoutMs?
Section titled “timeoutMs?”
readonlyoptionaltimeoutMs?:number
The longest wait for one attempt, in milliseconds. The default is 8000, and 15000 for
autocomplete.
transport?
Section titled “transport?”
readonlyoptionaltransport?: (input,init?) =>Promise<Response>
The function that sends each request. The default is the platform’s fetch.
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
Unofficial. Not made or endorsed by NIPOST.