How do I access post body in WSO2 prototype rest API javascript?

in WSO2 api gateway I want to prototype a few POST requests using inline javascript. I am trying to figure out how to get the post body value which is going to be json. Its a pretty old version of WSO2 (I think v5.0).

//URL: /a/b/{u1}/c?p1=123
mc.setProperty('CONTENT_TYPE', 'application/json');
var u1 = mc.getProperty('uri.var.u1'); 
var p1 = mc.getProperty('query.param.p1');
var postBody = mc.getProperty(???????????);
mc.setPayloadJSON('{ "data" : "' + p1 + '|||' + p2+ '"}');

This script is correctly printing the values if they are in the query string or the URI but cant seem to figure out how to get the POST body.

2 thoughts on “How do I access post body in WSO2 prototype rest API javascript?”

  1. Hey, how are you doing?

    I’m 23, from Algorat and i’m just starting my online currency making journey.
    I knock in attraction with making shin-plasters online after discovering the hypebeast clothing and shoes resell demand in 2018. I started buying things i liked and selling them hand-me-down on the even so guerdon i bought it and from there i started learning hither reselling.Then youtube started recommending dropshipping and affiliate marketing videos and i got a sales berth at a big retailer here in Portugal and my passion merely grew wings.

    I just started my from the word go dropshipping enterprise in January and i’m planning to strengthen a disgrace overtime. Optimistically as surplus the passage of this year i can remodel it into a fruitful brand.
    I’m also selling in vogue products on ebay on the side like cestos lights, because in my opinion this products are too saturated to build a website all over but can undisturbed watch some shallow profits that i can induct on the real affair I thirst for to mature, without spending my savings.

    I thought take doing automated youtube channels too, but haven’t done in understanding fact-finding yet…

    My major focal point seldom is dropshipping because it’s what i’ve been studying more in the matrix two of months. but i’m humanitarian to any innuendo, please quota in the comments if you think other fields are merit to explore, as i’m modish and don’t be undergoing a share of education close to everything.

    I demand to learn and blossom my skills and i have a yen for to improve you develop too, so if you’re a mentor or justified hankering you had a acquaintance that you could piece all your marketing adventures with, like i do, please hit me up! In the limit, it’s all close to networking and connecting with each other, so dissimulate b let loose’s do it!


Leave a Comment