How to solve this return error?

error[E0308]: mismatched types
  --> src\search\routes\common.rs:28:14
   |
28 |     .headers(construct_headers())
   |              ^^^^^^^^^^^^^^^^^^^ expected struct `search::routes::reqwest::header::HeaderMap`, found struct `hyper::header::Headers`
   |
   = note: expected struct `search::routes::reqwest::header::HeaderMap`
              found struct `hyper::header::Headers`

error[E0308]: mismatched types
  --> src\search\routes\common.rs:35:19
   |
35 |         return Ok(reszr);
   |                   ^^^^^ expected `()`, found struct `std::string::String`

If these codes doesnt work, what is the best way to call an API request and pass a result form a request as Response ??

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.