HTTP POST for a login request


#1

I am trying to sort out how to make a POST request for the following REST request:

http://domainname:8080/rest/s1/pop/login?username=username&password=password

I have set up a Generic JSON plugin

I have reviewed the relative threads on similar issues however I cannot make out how to get this to function and capture the JSON response from the request. Could someone on here walk me through the best way to make this happen?


#2

Hi, if you look at the plugin code (or exported code) you’ll notice that plugin will force “/” character to the end of the Source url setting.

I suggest you to check the Generic JSON plugin and make the needed modifications directly int the plugin. Note that you should rename the plugin and it’s identifier (in info.plist) or it will be overwritten in case we release an update.


#3

Thanks Antti, I was working to unwind the Generic JSON plugin and looked at some more basic code to execute the POST login. I will continue down that path. Wanted to try and stick with recommended approach if there was something already in place and easy to adopt, as I have very basic coding skills :slight_smile: Worse case, I will improve my overall understanding of plugins and React code.