added unit tests, chunked request support, raw file support