×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




I'm using AngularJS to replace a CGIDEV2 application. So far, it is not working out with the time I've wasted on it.

The $http post doesn't want to pass parms to the RPGLE routines. I can see the routine trying, but the POST variables aren't there.

I have the following:
var data = {
pagectl:"LOGIN",
pagesub1:"VALIDATE",
username: username,
password: password
};
var config= {
headers: {"Content-Type": "application/json"}
};
$http( { url:'/cgi-bin/wqa0100c',
method:"POST",
headers: {"Content-Type": "application/json"},
data: data
}
)
.success(function(response) {
console.log(response);
if( response.status=="OK" ) {
smn=response.smn;
slname=response.name;
} else {
$rootScope.error=response.errmsg;
}
});

The data isn't seen by the RPGLE routine. I can call it from the webbrowser and pass parameters as a GET process, no issue.
The same chunk of code is running in production now with the CGIDEV2 processes and is access via AJAX.

Any ideas?

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.