POSTMAN Suggested code in actual JQUERY

I use POSTMAN to test REST API Queries in CS. Many of the POST operation work in POSTMAN by providing the body correctly
The file I attached is a cut and paste from my postman session. There is something that is wrong with the FormData portion as 
I notice in Chrome Network traces. The call goes something like FormData[0]  in valid cases it is FormData[1] but apparently the enctype is correct
as in networktrace

I found an old post here https://appworksdeveloper.opentext.com/webaccess/#url=%2Fawd%2Fforums%2Fquestions%2F11095612%2Frest%2Bapi%2Band%2Bjson
that somehow talks about this but that code also does not seem to work. I tried doing that way in a simple folder creation.

if I use SMARTUI to observe the folder create it uses QueryString parameters which are not allowed in POST when you use REST API.
I really want to create a BWS which works pretty cool when I use the SmartUI but not through Jquery code.POSTMAN has 3 code suggestion areas
JS-Fetch, JS-Jquery, JS-XHR I have used all of them to no avail.

Does anyone who has done this before see where I am going wrong?
a more informative word link here https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=77931809&objAction=Download
Could this be because I am using a standard desktop HTML file surely that couldn't be because I can see the POST happen

I think there is something fundamentally I am missing on Content-Type should it be application/x-www-form-urlencoded  for this POST or 
multipart/form-data and perhaps POSTman gets by using some kind of auto-negotiate or some cors -header stuff 




Tagged:

Comments