--- # vibed-iq16 title: Implement HTTP search function status: todo type: task created_at: 2026-04-11T22:35:13Z updated_at: 2026-04-11T22:35:13Z parent: vibed-f05l blocked_by: - vibed-0t6e - vibed-mn9a --- Implement `async fn search(query: &str) -> Result` using reqwest. ## Todo - [ ] Define `AppError { Network(reqwest::Error), Parse(serde_json::Error) }` with Display + From impls - [ ] Implement `search()`: split query on whitespace for searchTerms, build full SearchRequest body - [ ] POST to `https://howlongtobeat.com/api/search` with headers: User-Agent (Firefox), Referer, Content-Type - [ ] Use `.json(&body)` for request and `.json::()` for response - [ ] Wire into `main`: call search, match Ok/Err, print error to stderr and exit(1) on failure - [ ] `cargo check` passes