Headers must be an object

When calling a webhook, the error headers must be an object indicates that the header in the HTTP request is not formatted as an array.

For example, this is a valid format for a header, as the Content-Type value is formatted as a single element array:

{ 
"Content-Type": [ "application/json" ]
}

For more information on request formatting, see http.get().

TypeError: Cannot access member ‘post’ of undefined

When making an HTTP request, the error TypeError: Cannot access member 'post' of undefined indicates that the HTTP service name defined in a webhook does not exist in your Realm app services.

For example, the following code tells your Realm application to use the service named foo:

const http = context.services.get("foo");

In order for the above code to execute, you need to add an HTTP service named foo to your Realm application:

Did this answer your question?