Lookup implementation

PR @zancas's work on lookup. PRs make it easy to do code reviews when new commits are pushed.
Check the status code, not the text. Throw an exception if the status code isn't in the 200s, and include `e.reason` in the exception that is thrown.