# What to do ? ERROR: HTTP.ExceptionRequest.StatusError(405, "GET",

**URL:** <https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897>\
**Category:** General Usage\
**Tags:** http-405\
**Created:** [March 12, 2020, 6:57pm UTC](https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897 "2020-03-12T18:57:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [March 12, 2020, 6:57pm UTC](https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897/1 "2020-03-12T18:57:25Z")

</div>

```julia
julia> usinh HTTP
ERROR: syntax: extra token "HTTP" after end of expression

julia> using HTTP

julia> url="https://www.similarweb.com/website/pb.pl"
"https://www.similarweb.com/website/pb.pl"

julia> r=HTTP.get(url);
ERROR: HTTP.ExceptionRequest.StatusError(405, "GET", "/website/pb.pl", HTTP.Messages.Response:
"""
HTTP/1.1 405 Method Not Allowed
Server: nginx
Date: Thu, 12 Mar 2020 18:54:21 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Accept-Ranges: bytes
X-DB: 0
X-DW: 32
X-DZ: 127.0.0.1
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Cache-Control: private, no-cache, no-store, must-revalidate
Edge-Control: no-store, bypass-cache
Surrogate-Control: no-store, bypass-cache

```

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [March 12, 2020, 8:35pm UTC](https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897/2 "2020-03-12T20:35:54Z")

</div>

It’s the server, they are rejecting your request, probably because it looks like a robot accessing the page. If you do:

```julia
HTTP.get(url;headers=Dict("User-Agent" => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"))

```

The page fetches correctly. HOWEVER the site appears to be a JavaScript application, not standard HTML. My guess most of the site is embedded in the /smlrdstl.js script…

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [March 13, 2020, 8:09am UTC](https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897/3 "2020-03-13T08:09:33Z")

</div>

Thanks, it works, but script…  
Is any cure for this

```julia
julia> url="https://www.styl.pl"
"https://www.styl.pl"

julia> HTTP.get(url;headers=Dict("User-Agent" => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (
KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"))
ERROR: IOError(MbedTLS error code -9984: X509 - Certificate verification failed, e.g. CRL, CA or signature check
 failed during request(https://www.styl.pl))

```

Paul

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [March 13, 2020, 11:28am UTC](https://discourse.julialang.org/t/what-to-do-error-http-exceptionrequest-statuserror-405-get/35897/4 "2020-03-13T11:28:25Z")

</div>

Two options, either you install their certificate, ugh. Or you configure HTTP to not verify the certificate. I would try this:

> [@Possible to bypass cert verification in Requests.jl or HTTP.jl?](https://discourse.julialang.org/t/possible-to-bypass-cert-verification-in-requests-jl-or-http-jl/5032/2):
>
> It’s an MbedTLS.jl option, so should work with either Requests or HTTP. With HTTP.jl, you’d do something like using HTTP, MbedTLS client = HTTP.Client(tlsconfig=MbedTLS.SSLConfig(false)) HTTP.get(client, url; options...)
