Added support for timeout argment

Similar to the Python library, this now supports ?timeout=[integer] to set the timeout in seconds.