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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -