Skip to content

Commit

Permalink
Merge pull request #17 from aropan/add-timeout-methods
Browse files Browse the repository at this point in the history
Added set_timeout and get_timeout methods
  • Loading branch information
niklasb committed Jul 6, 2015
2 parents e60bd7e + 915a3df commit c2dc9af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions webkit_server.py
Expand Up @@ -353,6 +353,14 @@ def set_proxy(self, host = "localhost",
""" Sets a custom HTTP proxy to use for future requests. """
self.conn.issue_command("SetProxy", host, port, user, password)

def set_timeout(self, timeout):
""" Set timeout for every webkit-server command """
self.conn.issue_command("SetTimeout", timeout)

def get_timeout(self):
""" Return timeout for every webkit-server command """
return int(self.conn.issue_command("GetTimeout"))

def clear_proxy(self):
""" Resets custom HTTP proxy (use none in future requests). """
self.conn.issue_command("ClearProxy")
Expand Down

0 comments on commit c2dc9af

Please sign in to comment.