https://github.com/julie-ng/blocklift-js-archived
See newer repository `blocklift-js`
https://github.com/julie-ng/blocklift-js-archived
Last synced: 7 months ago
JSON representation
See newer repository `blocklift-js`
- Host: GitHub
- URL: https://github.com/julie-ng/blocklift-js-archived
- Owner: julie-ng
- Created: 2019-12-20T09:08:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-22T15:07:19.000Z (over 5 years ago)
- Last Synced: 2025-02-01T02:41:57.441Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 562 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blocklift.js
A dead simple and developer friendly JavaScript library for handling object storage on Azure.
## Examples
### List Containers
```javascript
blocklift.listContainers()
.then((data) => console.log(data))
.catch((err) => console.error(err))
```## Responses
### Errors
Errors are `Object`s with the following attributes:
- `status` - HTTP status code (non 2xx)
- `headers` - Response Headers
- `data` - Response Body parsed from XML to JavaScript object#### Example
```javascript
{
status: 403,
headers: {
'content-length': '544',
'content-type': 'application/xml',
server: 'Microsoft-HTTPAPI/2.0',
'x-ms-request-id': 'a61c5522-e01e-001f-1873-b6530e000000',
'x-ms-error-code': 'AuthenticationFailed',
date: 'Thu, 19 Dec 2019 13:54:42 GMT',
connection: 'close'
},
data: {
Error: {
Code: 'AuthenticationFailed',
Message: 'Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\n' +
'RequestId:a61c5522-e01e-001f-1873-b6530e000000\n' +
'Time:2019-12-19T13:54:43.5404807Z',
AuthenticationErrorDetail: 'Signature not valid in the specified time frame: Start [Wed, 18 Dec 2019 14:25:14 GMT] - Expiry [Wed, 18 Dec 2019 22:25:14 GMT] - Current [Thu, 19 Dec 2019 13:54:43 GMT]'
}
}
}
```