Skip to content

Ajax call not working #144

@aniruddhasm

Description

@aniruddhasm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions