BoltCutter
New Member
Hello,
We are running Progress 11.7.4 and until recently, we had a lot of WEBSPEED embedded with our html, but have since removed all of that WEBSPEED and placed this solely into our APIs. To add to the complexity, we have also started using NodeJS as our back channel for serving our website and performing OKTA Open ID Connect and PKCE OAuth 2.0 Code Flow to reasonably secure our API calls. Our AJAX GET calls are working great, but we are not having success with AJAX POST calls. The GET-VALUE() in the post API does not have any data.
One final bit of complexity.
Our Website is hosted on Server#1. NodeJS runs on this server as well.
Server 2 hosts our Webspeed and APIs.
When an API is called it is sent to a port that NodeJs is listening on, Node re-routes the API call to Server#2.
Server#2 returns a h-t-t-p response back to NodeJs, which re-routes it back to Server 1's ajax callback code. A typical AJAX GET function might look something like this.
I have a single AJAX POST. too big in it's entirety to post here. I am hoping that one of our forum members can confirm that they have a post working using jQuery or vanilla JS to call their API and able to retrieve it from their API using GET-VALUE.
We are running Progress 11.7.4 and until recently, we had a lot of WEBSPEED embedded with our html, but have since removed all of that WEBSPEED and placed this solely into our APIs. To add to the complexity, we have also started using NodeJS as our back channel for serving our website and performing OKTA Open ID Connect and PKCE OAuth 2.0 Code Flow to reasonably secure our API calls. Our AJAX GET calls are working great, but we are not having success with AJAX POST calls. The GET-VALUE() in the post API does not have any data.
One final bit of complexity.
Our Website is hosted on Server#1. NodeJS runs on this server as well.
Server 2 hosts our Webspeed and APIs.
When an API is called it is sent to a port that NodeJs is listening on, Node re-routes the API call to Server#2.
Server#2 returns a h-t-t-p response back to NodeJs, which re-routes it back to Server 1's ajax callback code. A typical AJAX GET function might look something like this.
Code:
Code:
/*
** Displays in Product Description after a quicksearch,
** or entering qty at Parts Table.
*/
function getSinglePartAjax( cb ) {
var api = fmp.apiBaseUrl + "getstock/";
var str1 = "UserName=" + enURI( fmp.apiUserName ) + "&UserID=" + enURI( fmp.apiUserID ) +
"&part=" + enURI(fmp.apiPart) + "&qty=" + fmp.apiQty;
$.ajax({
url : api,
data : str1,
headers: {"x-auth-header": localStorage.getItem("access_token")},
type : 'GET'
})
.done( function(data, status, xhr) {
if ( parseAjaxSinglePart(data) ){
cb();
}
})
.fail( function( jqXHR, textStatus, errorThrown ) {
toastWarning( AJAX_ERROR_3 );
});
}
I have a single AJAX POST. too big in it's entirety to post here. I am hoping that one of our forum members can confirm that they have a post working using jQuery or vanilla JS to call their API and able to retrieve it from their API using GET-VALUE.
Last edited: