Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to parse JSONWS remote access

Shulou Source: shulou.com Published: 2022-06-01 14:01:51 09月26日 Update

This article introduces you how to analyze JSONWS remote access, the content is very detailed, interested friends can refer to, hope to be helpful to you.

JSONWS remote access $(document) .ready (function () {var username = "test@liferay.com"; var password = "test"; function auth (user, password) {var tok = user +':'+ password; var hash = btoa (tok); return "Basic" + hash } $.ajax ({url: 'http://localhost:8080/api/jsonws/user/get-user-by-id/user-id/20198', dataType: "json", type: "get", success: function (data) {alert (data);}, beforeSend: function (xhr) {xhr.setRequestHeader (' Authorization',auth (username, password)) }, complete: function () {}, error: function () {});}); javaString pathUrl = "http://localhost:8080/api/jsonws/user/get-user-by-id/user-id/20198";URL url = new URL (pathUrl); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection (); String userName =" test@liferay.com "; String password =" test "; String token = userName +": "+ password String authorString = "Basic" + Base64.encodeBase64String (token.getBytes ()); httpConn.setRequestProperty ("Authorization", authorString); remarks

Auth.token.check.enabled=false / / Unvalidate

On how to parse JSONWS remote access to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Content more help good interest remarks guys buddies articles knowledge articles references verification Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Tech Info Shulou Technology Microsoft macOS