Form data in body for Logstash HTTP filter

Hello,

I was wondering if anyone has had the syntax for using form data in the body of HTTP filter. I have tried all manor of ways to make it work, and searched the forums, but have not found anything.

This post is pretty similar, and I tried to use it, and it didn't work.

The error I am receiving:

The request body must contain the following parameter: 'grant_type'.

However, my filter code has the following:

    http {
        url => "webaddresshere"
        body_format => "text"
        verb => "POST"
        body => "'client_id=<clientid>'&'client_secret=<client_secret>'&'grant_type=client_credentials'&'scope=<scopeinfo>'"
    }

Any help would be greatly appreciated.

Is this something that might be better handed with a Ruby script or some other external method?

Thanks

Figured it out.
Need to have headers for Content_type and Content_Length.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.