buildUri()
@blobs/sdk / utils/query / buildUri
buildUri(
template,pathParams?,query?):string
Defined in: utils/query.ts:60
Build a URI from a template and params. Path tokens are encoded.
buildUri(‘/blobs/{id}’, { id: ‘abc’ }) → ‘/blobs/abc’ buildUri(‘/blobs’, undefined, { limit: 50 }) → ‘/blobs?limit=50’
Parameters
template
string
Path template containing {name} tokens.
pathParams?
Record<string, string | number>
Values to substitute for the path tokens.
query?
Optional query parameters appended via buildQuery.
Returns
string
The composed URI.
Throws
If a token in template has no corresponding entry in pathParams (catches typos early).