I was wondering the the Snowplow webhooks collector endpoint supported POST requests in addition to GET requests. The documentation and code suggest that POST requests may not work.
A quick test with an example schema yields the error “Querystring is empty: no Iglu-compatible event to process”, further suggestive that it’s only the query string being processed.
As there are quite a few services which only support POSTing payloads to a webhook URL what’s my best course of action here? I can think of three methods which might (?) be suitable:
- Write a new adapter for a com.snowplowanalytics.iglu/v2 endpoint which supports both GET arguments and POST.
- Write a new vendor adapter (similar to the existing vendor adapters now) specific to each service that are capable of extracting the body out of CollectorPayload.
- Writing an intermediate proxy service such that webhooks call a URL with the POST payload which is converted to a GET payload before being forwarded to the Iglu webhooks endpoint.
Method 3 is possibly the easiest method but not the cleanest because of the limitations of potentially converting a large/verbose POST payload into query parameters and although 1 and 2 seem more suitable I’m not a Scala guru (but the existing adapters seem to provide a good starting point).