Layer7 API Management

  • 1.  Set & Send form data in policy manager

    Posted Oct 26, 2017 11:52 PM

    Hi guys I'm using gateway 9.1 I have a backend which should be hit with a Post methods along with few form data. . . 

     

    In Postman client I can make a call with form data & no header . . 

     

    How can I set form data within policy manager ? 

    Set context variable assertion is asking for a type when I use data as message . 

     

    If I give multipart/form-data it is also expecting a boundary value . 

    I don't want to give any boundary value . 

     

    Any help is appreciated . 

     

    Thanks 



  • 2.  Re: Set & Send form data in policy manager

    Broadcom Employee
    Posted Oct 27, 2017 12:18 AM

    Hello siddharth-b ,

    You set a context variable like this,

     

    and in the route via http assertion, you set the request source to this variable,

     

    Regards,

    Mark



  • 3.  Re: Set & Send form data in policy manager
    Best Answer

    Posted Oct 27, 2017 04:26 AM

    Hi Mark,

     

    Well that did not work for me.

     

    Below thing is working..

     

    Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="a"

    1
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="b"

    2
    ------WebKitFormBoundary7MA4YWxkTrZu0gW--

     

    Thanks for answering.