Issue #89 Add support for array query parameters

Could this just `break` here and then this could just be a `while (true) {` and the `endReached` variable could just be removed.