import HttpProjectProxy from './HttpProjectProxy.js';
import RequestProxy from './RequestProxy.js';
export default class ProxyService {
    /**
     * Executes a single HTTP request.
     *
     * @param init The request to execute with additional configuration.
     * @returns The execution log for the request.
     */
    async proxyRequest(init) {
        const proxy = new RequestProxy();
        await proxy.configure(init);
        return proxy.execute();
    }
    /**
     * Executes an HttpProject.
     *
     * @param init The project run configuration.
     * @param token The user access token to read data from the store. Required with `IHttpProjectStoreProxyInit`.
     * @param storeUri The store's base URI. Required with `IHttpProjectStoreProxyInit`.
     * @returns The key under which the proxy is cached.
     */
    async proxyHttpProject(init, token, storeUri) {
        const proxy = new HttpProjectProxy();
        await proxy.configure(init, token, storeUri);
        return proxy.execute();
    }
}
//# sourceMappingURL=ProxyService.js.map