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

Is it possible to send bytes by post method? #371

Open
XingBin111 opened this issue May 11, 2020 · 1 comment
Open

Is it possible to send bytes by post method? #371

XingBin111 opened this issue May 11, 2020 · 1 comment

Comments

@XingBin111
Copy link

I want to send a image to server, and use CNN to predict its class, how can I send a image to server by post method?

@The-EDev
Copy link

The-EDev commented Oct 3, 2020

Looking at how crow handles requests, It seems that everything is sent as std::string, which means getting a multipart form file will give you the same thing as opening a .png file in notepad. So you'll need to either find a way to convert the multipart form string to binary (which I don't think should be difficult, but is rather slow IMO), or change the source code in http_request.h and maybe some other files to take the request as binary by default (maybe std::vetor<uint8_t>).

I'm saying "you need to" because this library is no longer in active development, and while a few developers (including myself) are interested in maintaining it, we may not have the time to modify it as much as we like to.

GerHobbelt pushed a commit to GerHobbelt/crow that referenced this issue Mar 23, 2022
Fixed issue where parser methods were in all caps
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