I have a GRAILS 3 controller that receives an HTTP message from webservice ( Chargify ) with this format (the payload section contains about 100 entries with a large number of subfields):
POST / HTTP/1.1 Accept: */*; q=0.5, application/xml Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded X-Chargify-Webhook-Id: 81309408 X-Chargify-Webhook-Signature: xxxxxxxxxxxxx X-Chargify-Webhook-Signature-Hmac-Sha-256: yyyyyyyyyyyyyy Content-Length: 48 User-Agent: Ruby X-Newrelic-Id: xxxxxx X-Newrelic-Transaction: aaaaaaaaaaaaaa= Host: myhost.test.it id=81197881&event=statement_settled&payload[site][id]=12345&payload[site][subdomain]=test-sandbox
Is it possible with GRAILS to analyze part of the "payload" and dynamically convert it to a POJO (or a simple hash file) ? Chargify use this strange format not recognized by the GRAILS framework , and I cannot analyze it automatically.
Is there anyone who can help me figure it out? Thank you for your help.
source share