How to use Wisdom RESTClient with login authentication?

When accessing the REST API, many systems require login authentication, and access to the API is only allowed after the login is successful. The following describes how to use  Wisdom RESTClient  to test the API in the case of login authentication.

The method is very simple: successfully log in to the system on the browser, take out the JSESSIONID value  in the cookie, and add a JSESSIONID record to the cookie in the Request view of Wisdom RESTClient to access the API normally. 

First, log in to the system using the Firefox browser. After the login is successful, the F12 shortcut key opens the browser's debug console. Select the "Network" menu bar, refresh the page, a new request record will be displayed, select a request record, the cookie information of the request will be displayed on the right, click the cookie option, find the JSESSIONID, and copy the corresponding value.

After the restclient fills in the request information of the REST API, an additional cookie record needs to be added in the cookie option under the Request view: the cookie name is JSESSIONID, and the value is the complete string copied, so that the API can be tested normally.

Precautions:

Generally, JSESSIONID will expire after a period of time. The expiration time depends on the configuration of the server. If it expires, replace it with a new value according to the above method.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326124002&siteId=291194637