Skip to content

question: HttpExchange support file upload download or not #30146

@jianchengwang

Description

@jianchengwang

Affects: spring6

hello guys, spring6 support HttpExchange to replace feign, i try it and find it doesn't work to upload or download file

here is upload example

@PostExchange("upload")
    Response<Void> upload(@PathVariable("module") String module,
                                       @RequestPart("files") MultipartFile[] files);

the error

WebClientResponseException$UnsupportedMediaType: 415 Unsupported Media Type from POST

by HttpExchange the content-type changed from multipart/form-data to application/vnd.spring-boot.actuator.v3+json


here is download example

    @GetExchange("downloadByDbId/{dbId}")
    void downloadByDbId(HttpServletResponse response, @PathVariable("dbId") Long dbId);

the error

No suitable resolver

so my question is HttpExchange support file upload download or not, if it can give me some example, i cant find it from spring.io

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectNeeds a fix in external projectfor: stackoverflowA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions