Added support for use not in HTTP context