diff --git a/vlib/http/http_test.v b/vlib/http/http_test.v index 1de50ac59a..1a76fa773d 100644 --- a/vlib/http/http_test.v +++ b/vlib/http/http_test.v @@ -1,4 +1,5 @@ import net.urllib +import http fn test_escape_unescape() { /* @@ -10,3 +11,8 @@ fn test_escape_unescape() { */ } +fn test_http_get() { + assert http.get_text('https://vlang.io/version') == '0.1.5' + println('http ok') +} + diff --git a/vlib/http/openssl_backend.v b/vlib/http/openssl_backend.v index 1b15d58310..b932ae96ff 100644 --- a/vlib/http/openssl_backend.v +++ b/vlib/http/openssl_backend.v @@ -15,10 +15,14 @@ struct C.SSL { } +fn init_module() { + init_openssl() +} + fn init_openssl() { C.SSL_library_init() - C.SSL_load_error_strings() - C.OPENSSL_config(0) + //C.SSL_load_error_strings() + //C.OPENSSL_config(0) } fn ssl_do(method, host_name, path string) string {