-
Notifications
You must be signed in to change notification settings - Fork 10
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
Can't do a POST via jquery #3
Comments
Ok i got it it works. You need set form data key name as 'json='. You could do it like this: var jsonParams = '{"parameter": [{"name": "xy", "value": "1"}, {"name": "page", "value": "2"}, {"name": "parent", "value": "3"}]}'; It works thanks! |
Hi All, If anyone was still looking for this to work below is a code that works for sure.
|
Hi,
I love the idea of our plugin but it is not possible to send POST request via Ajax and jquery.
I do always get the following exeption:
Chrome Debug:
400 (This page expects a form submission)
Jenkins:
"java.lang.reflect.InvocationTargetException"
"Caused by: javax.servlet.ServletException: This page expects a form submission but had only {...}"
I send the POST like this:
var jqxhr = $.post(
"http://xxy.xy.xyx.xy:8080/job/AddPage/build/api/json",
{"parameter":[{"name":"s_space","value":""},{"name":"s_page","value":""},{"name":"s_parent","value":""}],"statusCode":"303","redirectTo":"."},
"json"
)
Any Idea?
Thanks for helping me :)
The text was updated successfully, but these errors were encountered: