javascript - How to properly set the data in swagger-js client for a PUT request which requires BOTH formData and path parameters? -


i have method requires both formdata , path parameters. how can set data in request?

i using swagger-js v2.

let's example below requires 3 parameters:

  1. resetpassword path parameter
  2. password formdata parameter
  3. repeat_password formdata parameter

swagger_client.apis.users.resetpassword(<help!!>,   function(response) {      // success  }, function(err) {      // failure  }); 

i'm not sure if still relevant stucked @ same problem , found solution.

define parameter object this:

var paramobj = {                                resetpassword: "resetpw",                                parametercontenttype: "multipart/form-data",                                password: formdata1,                                repeat_password: formdata2                               };

then call with

swagger_client.apis.users.resetpassword(paramobj,... 

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -