How To send Multipart Request using router/engine/v1/gatewayProcessor?

I have create a Multipart file upload custom API and below are the controller signature

@PostMapping("/upload")
  public ResponseEntity<ResponseMessage> uploadFile(@RequestParam("file") MultipartFile file, @RequestHeader HttpHeaders headers) {
      // My Logic Here
      return ResponseEntity.status(HttpStatus.OK).body(new ResponseMessage(message));
  }

How can I configure this type of API as a pass-through in vConnect?

@Mayank @naks please answer the query asked here.

@naveen.gupta : To configure a multipart api that accepts files as input, you have to create a REST/SOAP API where you specify the request type as MULTI-PART-REQUEST.

If your API accepts JSON input and returns a multipart response then you can invoke it using the router/engine/v3.gatewayProcessor.

2 Likes

@Mayank, I have configured a multipart API as REST/SOAP API and exposed it as a service. How can I call this service?