import axios from "axios"; export class EnvVar { constructor ( public key: string, public value: string ) {} static get(namespace: string, name: string, containerName: string, onSuccess: (envVars: EnvVar[]) => void, onError: () => void) { const url = StringUtils.format('%s/pods/%s/%s/%s/env', ApiConfig.getHttpBase(), namespace, name, containerName); axios.get(url) .then((response) => { onSuccess(response.data); }) .catch(() => { onError(); }); } }