Cross Domain Server Side GET vs POST ?

Cross Domain Server Side GET vs POST ?

ghafarizghafariz Posts: 14Questions: 6Answers: 0

Hello, just a quick question here, maybe a noob one.
im trying to get a data using serverside on other subdomain, i know its using datatype jsonp and actually its working, but only on GET, how can i get the data using POST?
and then when i tried to console.log the returned data, its error, its using datasrc right?

Answers

  • kthorngrenkthorngren Posts: 21,324Questions: 26Answers: 4,949

    how can i get the data using POST?

    Use type: "POST", like this example.

    when i tried to console.log the returned data, its error, its using datasrc right?

    Sorry, I don't understand the question. What is the error?

    Yes, you can use console.log to output the JSON response in ajax.dataSrc. Or you can use the browser's network inspector tool to view the response. See this technote for details.

    Kevin

Sign In or Register to comment.