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

POST url is responding with the 500 error #124

Open
mohammmadahmed opened this issue Jul 7, 2020 · 1 comment
Open

POST url is responding with the 500 error #124

mohammmadahmed opened this issue Jul 7, 2020 · 1 comment

Comments

@mohammmadahmed
Copy link

mohammmadahmed commented Jul 7, 2020

not accepting JSON request

@mohammmadahmed
Copy link
Author

mohammmadahmed commented Jul 7, 2020

I have a config file with the input URL, get URL is working fine but POST URL is responding with the 500 error.
This post method containing basic credential and input body with the JSON data.

input {
http_poller {
urls => {
profile => {
method => get
user => "username"
password => "password"
url => "http://localhost:8080/activiti-app/api/enterprise/profile"
headers => {
Accept => "application/json"
}
}
taskhistory => {
method => post
user => "username"
password => "password"
url => "http://localhost:8080/activiti-app/api/enterprise/historic-tasks/query"
body =>"{}"
headers => {
Accept => "application/json"
}
}
}
request_timeout => 60
schedule => { cron => "* * * * * UTC"}
codec => "json"
metadata_target => "http_poller_metadata"
}
}

However, above get URL is working fine but the POST method is failing with the 500 error. When I see in the application side in the log, it's complaining contentType is application/text but required Json. how to pass JSON body with the request type json?

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