Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax call not working #144

Open
aniruddhasm opened this issue May 22, 2018 · 0 comments
Open

Ajax call not working #144

aniruddhasm opened this issue May 22, 2018 · 0 comments

Comments

@aniruddhasm
Copy link

Hello,

I am trying to implements simple ajax call to export the data.
This is my below sample code
express-admin.js

              $.ajax({
			type: 'GET',
			contentType: 'application/json',
			url: 'http://localhost:6003/getdata?data=my_name',
			success: function(call) {
				console.log('success');
				//console.log(JSON.stringify(data));
			},
			error: function(errorData){
				console.log('error');
			}
		});

app.js

        app.get('/getdata', function (req, res, next) {
		console.log('req---'+JSON.stringify(req.query));
		//next() // pass control to the next handler
	});

I am not getting console.log in the from the app.js file.
Let me know what is wrong with the above code. Please help I am stuck here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant