create callback for http client lib