# Error with HTTP get requests

**URL:** https://discourse.julialang.org/t/error-with-http-get-requests/88645
**Category:** General Usage
**Tags:** question
**Created:** [October 13, 2022, 4:18am UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645 "2022-10-13T04:18:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jonjilla](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jonjilla](https://discourse.julialang.org/u/jonjilla)
#### Post date: [October 13, 2022, 4:18am UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645/1 "2022-10-13T04:18:43Z")

</div>

Hello all

I have this error when using HTTP GET to retrieve data from a webservice. I have a properly formatted url and if I pass this url to curl like this, I can retrieve data correctly

```julia
r = read(`curl -s -k $url`, String);

```

I can also use the same url in python requests and I can return the same data correctly

```julia
r = requests.get(url,verify = False)

```

But when I run this in Julia with HTTP, I get this error

```julia
julia> r = HTTP.get(url; require_ssl_verification=false)
ERROR: HTTP.Exceptions.ConnectError("https://...", MbedTLS error code -28800: SSL - The requested feature is not available

```

Any idea why this would be failing and what I can do to resolve it?

---

<div class="post-metadata">

### Author: ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)
#### Post date: [October 13, 2022, 7:01am UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645/2 "2022-10-13T07:01:36Z")

</div>

Try defining a environment variable JULIA\_NO\_VERIFY\_HOSTS with the value \*\*  
And drop the keyword require\_ssl\_verification

See [GitHub - JuliaLang/NetworkOptions.jl](https://github.com/JuliaLang/NetworkOptions.jl#verify_host)

---

<div class="post-metadata">

### Author: ![jonjilla](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jonjilla](https://discourse.julialang.org/u/jonjilla)
#### Post date: [October 13, 2022, 3:44pm UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645/3 "2022-10-13T15:44:53Z")

</div>

No, that didn’t work. I tried all three options as below.

```julia
export JULIA_NO_VERIFY_HOSTS="**"
export JULIA_SSL_NO_VERIFY_HOSTS="**"
export JULIA_SSH_NO_VERIFY_HOSTS="**"

```

I still get the same error message

```julia
julia> r = HTTP.get(url)
ERROR: IOError(MbedTLS error code -28800: SSL - The requested feature is not available during request(

```

---

<div class="post-metadata">

### Author: ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)
#### Post date: [October 13, 2022, 3:50pm UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645/4 "2022-10-13T15:50:52Z")

</div>

Can you post the url?  
And the entire error msg?

---

<div class="post-metadata">

### Author: ![jonjilla](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jonjilla](https://discourse.julialang.org/u/jonjilla)
#### Post date: [October 13, 2022, 7:30pm UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645/5 "2022-10-13T19:30:26Z")

</div>

There is the entire message (with url redacted since it has the userid and password in it)

```julia
ERROR: IOError(MbedTLS error code -28800: SSL - The requested feature is not available during request(https://...

Stacktrace:
  [1] handshake(ctx::MbedTLS.SSLContext)
    @ MbedTLS /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/MbedTLS/WTiJ1/src/ssl.jl:81
  [2] handshake!
    @ /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/MbedTLS/WTiJ1/src/MbedTLS.jl:156 [inlined]
  [3] sslconnection(tcp::Sockets.TCPSocket, host::SubString{String}; require_ssl_verification::Bool, sslconfig::MbedTLS.SSLConfig, kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ConnectionPool /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/ConnectionPool.jl:745
  [4] #getconnection#29
    @ /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/ConnectionPool.jl:729 [inlined]
  [5] newconnection(pod::HTTP.ConnectionPool.Pod, T::Type, host::SubString{String}, port::SubString{String}, pipeline_limit::Int64, require_ssl_verification::Bool, idle_timeout::Int64; kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ConnectionPool /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/ConnectionPool.jl:626
  [6] getconnection(::Type{HTTP.ConnectionPool.Transaction{MbedTLS.SSLContext}}, host::SubString{String}, port::SubString{String}; connection_limit::Int64, pipeline_limit::Int64, idle_timeout::Int64, reuse_limit::Int64, require_ssl_verification::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ConnectionPool /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/ConnectionPool.jl:570
  [7] request(::Type{ConnectionPoolLayer{StreamLayer{Union{}}}}, url::URIs.URI, req::HTTP.Messages.Request, body::Vector{UInt8}; proxy::Nothing, socket_type::Type, reuse_limit::Int64, kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ConnectionRequest /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/ConnectionRequest.jl:85
  [8] request(::Type{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}, ::URIs.URI, ::Vararg{Any}; kw::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ HTTP.ExceptionRequest /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/ExceptionRequest.jl:19
  [9] (::Base.var"#88#90"{Base.var"#88#89#91"{ExponentialBackOff, HTTP.RetryRequest.var"#2#3"{Bool, HTTP.Messages.Request}, typeof(HTTP.request)}})(::Type, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{Nothing, Bool}, Tuple{Symbol, Symbol}, NamedTuple{(:iofunction, :reached_redirect_limit), Tuple{Nothing, Bool}}})
    @ Base ./error.jl:309
 [10] #request#1
    @ /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/RetryRequest.jl:44 [inlined]
 [11] request(::Type{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}, method::String, url::URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.MessageRequest /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/MessageRequest.jl:66
 [12] request(::Type{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}, method::String, url::URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; kw::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:reached_redirect_limit,), Tuple{Bool}}})
    @ HTTP.BasicAuthRequest /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/BasicAuthRequest.jl:28
 [13] request(::Type{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}, method::String, url::URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP.RedirectRequest /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/RedirectRequest.jl:28
 [14] request
    @ /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/RedirectRequest.jl:18 [inlined]
 [15] #request#1
    @ /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/TopRequest.jl:15 [inlined]
 [16] request(::Type{TopLayer{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}}, ::String, ::URIs.URI, ::Vector{Pair{SubString{String}, SubString{String}}}, ::Vector{UInt8})
    @ HTTP.TopRequest /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/TopRequest.jl:15
 [17] request(method::String, url::URIs.URI, h::Vector{Pair{SubString{String}, SubString{String}}}, b::Vector{UInt8}; headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}, query::Nothing, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HTTP /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/HTTP.jl:330
 [18] request (repeats 2 times)
    @ /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/HTTP.jl:328 [inlined]
 [19] #get#17
    @ /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/HTTP.jl:407 [inlined]
 [20] get(a::URIs.URI)
    @ HTTP /prj/dpprd/data/data_team_workspace/ye/julia/PKG/packages/HTTP/aTjcj/src/HTTP.jl:407
 [21] top-level scope
    @ REPL[3535]:1

```

---

<div class="post-metadata">

### Author: ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)
#### Post date: [October 18, 2022, 5:33am UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645/6 "2022-10-18T05:33:23Z")

</div>

> [@jonjilla](#):
>
> `The requested feature is not available`

Hmmm, this is a pretty weird error message to get from mbedtls. It makes me wonder if the exact webservice is using some esoteric algorithm or tls technique that mbedtls just doesn’t support.

If you update to HTTP.jl 1.5 (released today!), you could try switching to OpenSSL.jl as the TLS provider, like:

```julia
using HTTP, OpenSSL
r = HTTP.get(url; socket_type_tls=SSLStream, require_ssl_verification=false)

```

---

<div class="post-metadata">

### Author: ![jonjilla](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jonjilla](https://discourse.julialang.org/u/jonjilla)
#### Post date: [October 18, 2022, 6:14am UTC](https://discourse.julialang.org/t/error-with-http-get-requests/88645/7 "2022-10-18T06:14:22Z")

</div>

Thanks, that worked!
