mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
cleanup lint error: semicolon
This commit is contained in:
parent
7439f6d08f
commit
fd9dffdd7c
12
types/request/index.d.ts
vendored
12
types/request/index.d.ts
vendored
@ -180,7 +180,7 @@ declare namespace request {
|
||||
|
||||
export type ResponseRequest = CoreOptions & {
|
||||
uri: Url;
|
||||
}
|
||||
};
|
||||
|
||||
export interface RequestResponse extends http.IncomingMessage {
|
||||
request: ResponseRequest;
|
||||
@ -210,7 +210,7 @@ declare namespace request {
|
||||
postData?: {
|
||||
mimeType?: string;
|
||||
params?: NameValuePair[];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export interface NameValuePair {
|
||||
@ -294,7 +294,7 @@ declare namespace request {
|
||||
token_secret?: string;
|
||||
transport_method?: 'body' | 'header' | 'query';
|
||||
verifier?: string;
|
||||
body_hash?: true | string
|
||||
body_hash?: true | string;
|
||||
}
|
||||
|
||||
export interface HawkOptions {
|
||||
@ -307,9 +307,9 @@ declare namespace request {
|
||||
}
|
||||
|
||||
export interface CookieJar {
|
||||
setCookie(cookie: Cookie, uri: string | url.Url, options?: any): void
|
||||
getCookieString(uri: string | url.Url): string
|
||||
getCookies(uri: string | url.Url): Cookie[]
|
||||
setCookie(cookie: Cookie, uri: string | url.Url, options?: any): void;
|
||||
getCookieString(uri: string | url.Url): string;
|
||||
getCookies(uri: string | url.Url): Cookie[];
|
||||
}
|
||||
|
||||
export interface CookieValue {
|
||||
|
||||
@ -610,10 +610,10 @@ var rand = Math.floor(Math.random() * 100000000).toString();
|
||||
}
|
||||
, (error, response, body) => {
|
||||
if (response.statusCode == 201) {
|
||||
console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand)
|
||||
console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand);
|
||||
} else {
|
||||
console.log('error: ' + response.statusCode)
|
||||
console.log(body)
|
||||
console.log('error: ' + response.statusCode);
|
||||
console.log(body);
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -625,28 +625,28 @@ request(
|
||||
}
|
||||
, (error, response, body) => {
|
||||
// body is the decompressed response body
|
||||
console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))
|
||||
console.log('the decoded data is: ' + body)
|
||||
console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'));
|
||||
console.log('the decoded data is: ' + body);
|
||||
}
|
||||
).on('data', (data: any) => {
|
||||
// decompressed data as it is received
|
||||
console.log('decoded chunk: ' + data)
|
||||
console.log('decoded chunk: ' + data);
|
||||
})
|
||||
.on('response', (response: http.IncomingMessage) => {
|
||||
// unmodified http.IncomingMessage object
|
||||
response.on('data', (data: any[]) => {
|
||||
// compressed data as it is received
|
||||
console.log('received ' + data.length + ' bytes of compressed data')
|
||||
})
|
||||
console.log('received ' + data.length + ' bytes of compressed data');
|
||||
});
|
||||
});
|
||||
|
||||
var requestWithJar = request.defaults({jar: true})
|
||||
var requestWithJar = request.defaults({jar: true});
|
||||
requestWithJar('http://www.google.com', () => {
|
||||
requestWithJar('http://images.google.com');
|
||||
});
|
||||
|
||||
var j = request.jar()
|
||||
requestWithJar = request.defaults({jar: j})
|
||||
var j = request.jar();
|
||||
requestWithJar = request.defaults({jar: j});
|
||||
requestWithJar('http://www.google.com', () => {
|
||||
requestWithJar('http://images.google.com');
|
||||
});
|
||||
@ -663,12 +663,12 @@ request({url: url, jar: j}, () => {
|
||||
// var FileCookieStore = require('tough-cookie-filestore');
|
||||
// NOTE - currently the 'cookies.json' file must already exist!
|
||||
// var j = request.jar(new FileCookieStore('cookies.json'));
|
||||
requestWithJar = request.defaults({ jar : j })
|
||||
requestWithJar = request.defaults({ jar : j });
|
||||
request('http://www.google.com', () => {
|
||||
request('http://images.google.com');
|
||||
});
|
||||
|
||||
var j = request.jar()
|
||||
var j = request.jar();
|
||||
request({url: 'http://www.google.com', jar: j}, () => {
|
||||
var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..."
|
||||
var cookies = j.getCookies(url);
|
||||
|
||||
@ -59,7 +59,6 @@
|
||||
"prefer-switch": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"triple-equals": false,
|
||||
"unified-signatures": false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user