Git Product home page Git Product logo

Comments (6)

mikedilger avatar mikedilger commented on May 23, 2024

formdata was written for hyper version 0.10. You are specifying "*" which will pickup the lastest hyper which I believe is version 0.12. There are many breaking changes between those two versions. I haven't tried using formdata with hyper 0.12... I suspect it's possible but I just haven't looked into the differences closely enough.

from formdata.

mikedilger avatar mikedilger commented on May 23, 2024

maybe something like this (I haven't tried it):

let headers = hyper_request.headers();

and then instead of using 'reader' just use 'hyper_request' itself.

from formdata.

sinitcin avatar sinitcin commented on May 23, 2024
error[E0308]: mismatched types
  --> src/post_multipart/post_multipart.rs:38:69
   |
38 |         let form_data = formdata::read_formdata(&mut hyper_request, headers).unwrap();
   |                                                                     ^^^^^^^ expected struct `hyper::header::Headers`, found struct `hyper::HeaderMap`
   |
   = note: expected type `&hyper::header::Headers`
              found type `&hyper::HeaderMap`

error[E0277]: the trait bound `hyper::Request<()>: std::io::Read` is not satisfied
  --> src/post_multipart/post_multipart.rs:38:25
   |
38 |         let form_data = formdata::read_formdata(&mut hyper_request, headers).unwrap();
   |                         ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::io::Read` is not implemented for `hyper::Request<()>`
   |
   = note: required by `formdata::read_formdata`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: Could not compile `microservice`.

Good try, but no =( Can you upgrade crate for compatibility with latest version of hyper?

from formdata.

mikedilger avatar mikedilger commented on May 23, 2024

You might want to look for a different library as I don't have the time to work on upgrading formdata at the moment. But I'll leave this issue open as it does need to be addressed eventually if formdata is to survive.

from formdata.

sinitcin avatar sinitcin commented on May 23, 2024

Thank you anyway. If i can fix this earlier that you i send PR for you.

from formdata.

mikedilger avatar mikedilger commented on May 23, 2024

Closing to to archival status

from formdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.