Tuesday, 5 March 2019

How to use DefaultCredentials in TypeScript HTTP request

Need help to find analogous of this powershell construct in Typescript:

Invoke-WebRequest -Uri "http://internalurl"  -Method Get -UseDefaultCredentials

I tried the following request in typescript:

        const options = {
            url: `${this.endpoint}/API/${url}`,
            withCredentials: true
        };

        const response = await request(options);
        return JSON.parse(response);

Not sure how do I specify the request to use Default credentials.



from How to use DefaultCredentials in TypeScript HTTP request

No comments:

Post a Comment