Hi @marsbaa,
With 2FA it's possible authenticating using:
const credentialOptions = { username: '', password: '' };
const spr = sprequest.create(credentialOptions);
spr.get('http://mysites/User%20Photos/Profile%20Pictures/nhayman_LThumb.jpg').then(function (response) {
return response.body;
});
/_api/Web/GetFileByServerRelativeUrl(@FileServerRelativeUrl)/$value
sp-request
lib and return the raw image data?http://mysites/_api/web/GetFolderByServerRelativeUrl('/User%20Photos/Profile%20Pictures')/Files('nhayman_LThumb.jpg')/$value
const spr = sprequest.create(credentialOptions);
spr.get(fileUrl).then(function (response) {
return response.body; // I'm not writing the file to disk because I need to send it to another API
});
HTTP_PROXY=http://my-proxy HTTPS_PROXY=http://my-proxy node ./index.js
. As you're talking about VSCode extension you can try setting up these environment variables, not for a console process but OS user.
@hanadkubat, thanks for starting using the generator. Yes, we still have 2013 projects.
when I publish my work to Sharepoint and open the html document directly
Didn't get this. After assets are published, html should be added to CEWP as a source link. For SPA, it can be web parts page with a single content editor web part. Pages+CEWP can be provisioned with PnP Provisioning Engine or SPMeta2 in automated way, or configured manually.