1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

http: replace method string with an enum

This commit is contained in:
Alexander Medvednikov
2020-07-27 21:20:05 +02:00
parent 65159b8070
commit fec9920b1a
2 changed files with 44 additions and 21 deletions

View File

@ -10,7 +10,7 @@ const (
is_used = openssl.is_used
)
fn (req &Request) ssl_do(port int, method, host_name, path string) ?Response {
fn (req &Request) ssl_do(port int, method Method, host_name, path string) ?Response {
// ssl_method := C.SSLv23_method()
ssl_method := C.TLSv1_2_method()
ctx := C.SSL_CTX_new(ssl_method)