16 lines
551 B
JavaScript
16 lines
551 B
JavaScript
const { getAuth } = require('./auth_manager');
|
|
|
|
async function main() {
|
|
const { token, userId } = await getAuth();
|
|
const auth = Buffer.from(userId + ':' + token).toString('base64');
|
|
const res = await fetch(`https://registry.ghaymah.systems/v2/${userId}/soc-gateway/blobs/uploads/`, {
|
|
method: 'POST',
|
|
headers: { 'Authorization': 'Basic ' + auth }
|
|
});
|
|
console.log('Status:', res.status, res.statusText);
|
|
console.log('Location:', res.headers.get('location'));
|
|
console.log('Body:', await res.text());
|
|
}
|
|
|
|
main().catch(console.error);
|