We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried website crawling with this codes
use std::collections::HashMap; use reqwest::header::USER_AGENT; use reqwest::header::ACCEPT; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let client = reqwest::Client::new(); let res = client.post("https://opendart.fss.or.kr/api/list.json") .header(USER_AGENT, "test") .header(ACCEPT, "application/json") .send() .await?; println!("{:#?}", res); Ok(()) }
but this codes returned error. Error: reqwest::Error { kind: Request, url: "https://opendart.fss.or.kr/api/list.json", source: hyper::Error(Connect, Custom { kind: Other, error: Custom { kind: InvalidData, error: AlertReceived(HandshakeFailure) } }) }
so then i tried another code with curl library
use std::io::{stdout, Write}; use curl::easy::Easy; use curl::easy::List; // Print a web page onto stdout fn main() { let mut easy = Easy::new(); let mut list = List::new(); list.append("user-agent: test").unwrap(); list.append("accept: application/json").unwrap(); easy.url("https://opendart.fss.or.kr/api/list.json").unwrap(); easy.http_headers(list).unwrap(); easy.write_function(|data| { stdout().write_all(data).unwrap(); println!("{}", data.len()); Ok(data.len()) }).unwrap(); easy.perform().unwrap(); println!("{}", easy.response_code().unwrap()); }
this codes is fine.
I want to know why this is happening.
The text was updated successfully, but these errors were encountered:
https://www.hardenize.com/report/opendart.fss.or.kr/1590494615#www_tls This server is horribly configured and does not support modern encryption. Therefore many clients won't be able to connect. If you are using Rustls, it correctly demands the use of ECDHE ciphersuites - which this server does not offer.
Sorry, something went wrong.
Thanks for your response.
In fact Korea's government sites are poor maintenance. 😂
Is there no other way than to use curl?
because i use deno lang. by the way deno use reqwest in internal deno code.
No branches or pull requests
I tried website crawling with this codes
but this codes returned error.
Error: reqwest::Error { kind: Request, url: "https://opendart.fss.or.kr/api/list.json", source: hyper::Error(Connect, Custom { kind: Other, error: Custom { kind: InvalidData, error: AlertReceived(HandshakeFailure) } }) }
so then i tried another code with curl library
this codes is fine.
I want to know why this is happening.
The text was updated successfully, but these errors were encountered: