我有一个curl命令,该命令使用multiform / form-data作为Content Type发布数据。请求如下
curl -X POST http://localhost:50005/77 -H'content-type:multipart / form-data; boundary = --- WebKitFormBoundary7MA4YWxkTrZu0gW'-F'instruction = {“ action”:“ produce”,“ data”:[{“ id”:“ user1”,“ type”:“ Person”}]}'
如何在Spring Boot控制器中从请求中读取“指令”参数?
答案 0 :(得分:0)
Curl请求不正确,正确的curl请求是 curl -X POST http://localhost:50005/77 -H'内容类型:multipart / form-data'-F指令='{“ action”:“ produce”,“ data”:[{“ id”:“ user1”, “ type”:“人”}]}'