sogou / workflow

C++ Parallel Computing and Asynchronous Networking Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

咨询curl向workflow server上传文件,workflow server如何读取文件内容

Treston-W opened this issue · comments

我想通过curl命令向workflow server上传文件,如:
curl -F "file=@./curl.log" http://127.0.0.1:8000

其中curl.log的内容如下:
image

我在workflow server端通过req->get_parsed_body()拿到的数据如下:
image
image
如上图所示,body为原始文件数据+一些格式数据

如果我只想拿到那三行文件内容,我需要基于那一堆body去自定义解析拿到,还是咱们workflow有现成的提取工具?

这是multipart/form-data吧。wfrest里好像有支持这个的解析:https://github.com/wfrest/wfrest