Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load a page using HTTP GET Request (not via browser) #4953

Closed
tomersein opened this issue Jul 5, 2022 · 3 comments
Closed

Unable to load a page using HTTP GET Request (not via browser) #4953

tomersein opened this issue Jul 5, 2022 · 3 comments

Comments

@tomersein
Copy link

Current Behavior

Hello,

I'm trying to get a page from https://crates.io/crates, specifically using the URL: https://crates.io/crates/regex/versions
I am using the header of Accept: text/html as a workaround of the 404 issue response, however I always get a static html page which contains the below error:

Sorry, it looks like we were not able to load the page. Please make sure your network connection works and you are using an up-to-date browser. If the issue persists, please visit our https://github.com/rust-lang/crates.io/issues/new/choose" issue tracker to report the problem.'

Can you please let me know if I am missing anything?

Thanks!

Expected Behavior

Getting the static html page which I can see via browser.

Steps To Reproduce

No response

Environment

OS: windows

Anything else?

No response

@tomersein tomersein added the C-bug 🐞 Category: unintended, undesired behavior label Jul 5, 2022
@Turbo87
Copy link
Member

Turbo87 commented Jul 5, 2022

Can you please let me know if I am missing anything?

the page is currently only rendered client-side via javascript.

closing this as a duplicate of #4783 and #788 :)

@Turbo87 Turbo87 closed this as completed Jul 5, 2022
@Turbo87 Turbo87 added duplicate A-frontend 🐹 and removed C-bug 🐞 Category: unintended, undesired behavior labels Jul 5, 2022
@tatsuya6502
Copy link
Contributor

@tomersein — If you want to get the versions of regex crate, you can try to get this URL instead: https://crates.io/api/v1/crates/regex/versions and parse the returned JSON.

I do not know how to do this on Windows, but if on Linux or macOS, you can run the following commands on a terminal to parse the JSON response:

$ curl -L https://crates.io/api/v1/crates/regex/versions | \
    jq -r '.versions[] | select( .yanked == false) | .num' | \
    sort --version-sort
0.1.0
0.1.1
...
1.5.5
1.5.6

@tomersein
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants