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

[Q] Any way to use curl/wget a referenced file? #27

Closed
2ndMessiah opened this issue Oct 24, 2022 · 3 comments
Closed

[Q] Any way to use curl/wget a referenced file? #27

2ndMessiah opened this issue Oct 24, 2022 · 3 comments
Labels
question Further information is requested

Comments

@2ndMessiah
Copy link

Hi Jstayton!

Nice job on Suri!!

My question is: Is it possible to download a file that's pointed to by Suri?

Forgive my noobness.

Appreciate it!

@jstayton jstayton added the question Further information is requested label Jan 2, 2023
@jstayton
Copy link
Member

jstayton commented Jan 2, 2023

Hey @2ndMessiah – Sorry for the long delay. If you're still wondering about this, can you explain a bit more? Are you wanting to use cURL/Wget on the command line to download a file that's redirected to by Suri?

@2ndMessiah
Copy link
Author

Hey @2ndMessiah – Sorry for the long delay. If you're still wondering about this, can you explain a bit more? Are you wanting to use cURL/Wget on the command line to download a file that's redirected to by Suri?

Thx for the reply. Yeah exactly. Now I would curl the shortened url to get the original url and curl it again to download it. Is there a better way? It's all good never mind:)

@jstayton
Copy link
Member

jstayton commented Jan 2, 2023

The short URL will respond with the HTML to do the redirect. You would need to parse the original URL out of that to then download it, since non-HTML environments like cURL/Wget don't automatically follow that type of redirect (as they do with 3xx HTTP status codes, which Suri doesn't use).

Hope that helps!

@jstayton jstayton closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants