1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

http/fetch: added stream param

This commit is contained in:
Gabor Adam Toth 2011-08-24 11:33:04 +02:00
parent e440532c58
commit 595ce50f5c
4 changed files with 23 additions and 54 deletions

View file

@ -25,7 +25,7 @@ volatile int authorized = 0;
oauth_success() {}
oauth_error() {}
varargs void fetch(object ua, string url, string method, mapping post, mapping oauth) {
varargs void fetch(object ua, string url, string method, mapping post, mapping oauth, int stream) {
P3((">> oauth:fetch(%O, %O, %O)\n", url, method, oauth))
unless (method) method = "GET";
unless (post) post = ([]);
@ -53,7 +53,7 @@ varargs void fetch(object ua, string url, string method, mapping post, mapping o
foreach (string key, string value : oauth)
p += (strlen(p) ? "," : "") + key + "=\"" + urlencode(to_string(value)) + "\"";
ua->fetch(url, method, post, (["authorization": "OAuth " + p]));
ua->fetch(url, method, post, (["authorization": "OAuth " + p]), stream);
}
void parse_request_token(string body, mapping headers, int http_status) {