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

query_bulk() fails to deserialize #1

Open
JosiahParry opened this issue Jan 1, 2025 · 2 comments
Open

query_bulk() fails to deserialize #1

JosiahParry opened this issue Jan 1, 2025 · 2 comments

Comments

@JosiahParry
Copy link

JosiahParry commented Jan 1, 2025

Thanks for the follow! Your crate seems simple enough to be able to make an R wrapper quite quickly. Figured I could spend an hour or so on it however it looks like the 'query_bulk() ' function fails to deserialize properly whereas query_ip() succeeds.

Note that this is use default tokio features

let rt = tokio::runtime::Builder::new_current_thread()
    .enable_time()
    .enable_io()
    .build()?;


let res = rt.block_on(query_bulk(vec!["1.1.1.1"])).unwrap();
thread '<unnamed>' panicked at src/lib.rs:148:49:
called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: Error("invalid type: map, expected a sequence", line: 1, column: 0) }
stack backtrace:
@JosiahParry
Copy link
Author

It looks like it will error when the vector is length 1 and not when the vector is > length 1

@ipqwery
Copy link
Owner

ipqwery commented Jan 2, 2025

Yeah theres an issue with query_bulk in the library, I can fix it later next week or if you have time you can submit a pull request.
Bulk lookup works so its just an issue with map it seems
https://api.ipquery.io/1.1.1.1,1.1.1.2

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

No branches or pull requests

2 participants