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

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -