mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
fix lint error
This commit is contained in:
@@ -626,25 +626,26 @@ request.get('http://10.255.255.1', {timeout: 1500}, (err) => {
|
||||
});
|
||||
|
||||
const rand = Math.floor(Math.random() * 100000000).toString();
|
||||
request(
|
||||
{ method: 'PUT'
|
||||
, uri: 'http://mikeal.iriscouch.com/testjs/' + rand
|
||||
, multipart:
|
||||
[ { headers: { 'content-type': 'application/json' }
|
||||
, body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, content_type: 'text/plain' }}})
|
||||
}
|
||||
, { body: 'I am an attachment' }
|
||||
]
|
||||
|
||||
request(
|
||||
{ method: 'PUT'
|
||||
, uri: 'http://mikeal.iriscouch.com/testjs/' + rand
|
||||
, multipart:
|
||||
[ { headers: { 'content-type': 'application/json' }
|
||||
, body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, content_type: 'text/plain' }}})
|
||||
}
|
||||
, (error, response, body) => {
|
||||
if (response.statusCode === 201) {
|
||||
console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand);
|
||||
} else {
|
||||
console.log('error: ' + response.statusCode);
|
||||
console.log(body);
|
||||
}
|
||||
, { body: 'I am an attachment' }
|
||||
]
|
||||
}
|
||||
, (error, response, body) => {
|
||||
if (response.statusCode === 201) {
|
||||
console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand);
|
||||
} else {
|
||||
console.log('error: ' + response.statusCode);
|
||||
console.log(body);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
request(
|
||||
{ method: 'GET'
|
||||
|
||||
Reference in New Issue
Block a user