avancement planning
This commit is contained in:
+7
-1
@@ -18,12 +18,18 @@ limitations under the License.
|
||||
*/
|
||||
const fetch_1 = require("./fetch");
|
||||
class TimestampAuthority {
|
||||
options;
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
}
|
||||
async createTimestamp(request) {
|
||||
const { baseURL, timeout, retry } = this.options;
|
||||
const url = `${baseURL}/api/v1/timestamp`;
|
||||
// Account for the fact that the TSA URL may already include the full
|
||||
// path if the client was initalized from a `SigningConfig` service entry
|
||||
// (which always uses the full URL).
|
||||
const url = new URL(baseURL).pathname === '/'
|
||||
? `${baseURL}/api/v1/timestamp`
|
||||
: baseURL;
|
||||
const response = await (0, fetch_1.fetchWithRetry)(url, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user