request timeout, curl in NAT

This commit is contained in:
2021-08-12 23:13:49 -06:00
parent 6bfa807ac4
commit c44122ec8c
3 changed files with 24 additions and 12 deletions

View File

@@ -5,11 +5,13 @@ import python.Dict;
import python.KwArgs;
typedef NativeRequestKwArgs = {
?headers:Dict<String, String>
?headers:Dict<String, String>,
?timeout:Float
}
typedef RequestKwArgs = {
?headers:Map<String, String>
?headers:Map<String, String>,
?timeout:Float
}
@:pythonImport("requests")
@@ -36,7 +38,8 @@ class Requests {
if (kwArgs == null)
return null;
return {
headers: mapToDict(kwArgs.headers)
headers: mapToDict(kwArgs.headers),
timeout: kwArgs.timeout
};
}
}