# How to do http request to get the whole source page when part of html loaded by javascript?

**URL:** <https://discourse.julialang.org/t/how-to-do-http-request-to-get-the-whole-source-page-when-part-of-html-loaded-by-javascript/69501>\
**Category:** General Usage\
**Tags:** web, http\
**Created:** [October 10, 2021, 6:30am UTC](https://discourse.julialang.org/t/how-to-do-http-request-to-get-the-whole-source-page-when-part-of-html-loaded-by-javascript/69501 "2021-10-10T06:30:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuxinyu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wuxinyu/32/28059_2.png) [@wuxinyu](https://discourse.julialang.org/u/wuxinyu)\
**Post date:** [October 10, 2021, 6:30am UTC](https://discourse.julialang.org/t/how-to-do-http-request-to-get-the-whole-source-page-when-part-of-html-loaded-by-javascript/69501/1 "2021-10-10T06:30:25Z")

</div>

I wait to get the html web page from [https://www.collinsdictionary.com/dictionary/english/supremacy](https://www.collinsdictionary.com/dictionary/english/supremacy), but part of the html file is loaded by `javascript`. When I use `HTTP.jl` to get the web page with `HTTP.request()`, I only get part of the html file that loaded before the `javascript` been run, so the web page I get is different to the web page I got from Chrome. How can I get the web page as same as Chrome get? Do I have to use [WebDriver.jl](https://github.com/shashi/WebDriver.jl#webdriver) with is a a wrapper around [Selenium WebDriver](http://www.seleniumhq.org/projects/webdriver/)’s [python bindings](http://selenium-python.readthedocs.io/api.html)?

I wait to get the html web page from [https://www.collinsdictionary.com/dictionary/english/supremacy](https://www.collinsdictionary.com/dictionary/english/supremacy), but part of the html file is loaded by `javascript` . When I use `HTTP.jl` to get the web page with `HTTP.request()` , I only get part of the html file that loaded before the `javascript` been run, so the web page I get is different to the web page I got from Chrome. How can I get the web page as same as Chrome get? Do I have to use [WebDriver.jl](https://github.com/shashi/WebDriver.jl#webdriver) with is a a wrapper around [Selenium WebDriver](http://www.seleniumhq.org/projects/webdriver/)’s [python bindings](http://selenium-python.readthedocs.io/api.html)?

part of my source:

```julia
function get_page(w::word)::Bool
    response = nothing
    try
        response = HTTP.request("GET", "https://www.collinsdictionary.com/dictionary/$(dictionary)/$(w.org_word)",
                                                 connect_timeout=connect_timeout, readtimeout=readtimeout, retries=retries, redirect=true,proxy=proxy)
    catch e
        push!(w.err_log, [get_page_http_err, string(e)])
        return falses
    end
    open("./assets/org_page.html", "w") do f 
        write(f, String(response.body))
    end
    return true
end

```

`dictionary` and `w.org_word` are both `String` , the function is in a `module` .
