Rocky_Mountain_Vending/.pnpm-store/v10/files/8d/e7126f0632ec155f1bcc42bd5ff020847b4a7a9b06b53f51bb4e0eec908ac85230ad8a2affc93d4adf6e0e96ac5517815062ed3531a37f0f00354dbef66b4c
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

27 lines
1.1 KiB
Text

import { FetchHttpHandler } from "@smithy/fetch-http-handler";
import { CredentialsProviderError } from "@smithy/property-provider";
import { checkUrl } from "./checkUrl";
import { createGetRequest, getCredentials } from "./requestHelpers";
import { retryWrapper } from "./retry-wrapper";
export const fromHttp = (options = {}) => {
options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
let host;
const full = options.credentialsFullUri;
if (full) {
host = full;
}
else {
throw new CredentialsProviderError("No HTTP credential provider host provided.", { logger: options.logger });
}
const url = new URL(host);
checkUrl(url, options.logger);
const requestHandler = new FetchHttpHandler();
return retryWrapper(async () => {
const request = createGetRequest(url);
if (options.authorizationToken) {
request.headers.Authorization = options.authorizationToken;
}
const result = await requestHandler.handle(request);
return getCredentials(result.response);
}, options.maxRetries ?? 3, options.timeout ?? 1000);
};