Realm API Testing - Basic

Hello. Apologies for any flubs in phrasing this question. I’m new to MongoDB and followed tutorial by MongoDB’s Michael Lynn.

After configuring the API, the webhooks and function, Michael tested the API endpoint with Postman. However, he used a POST method to get the data. It worked, but I’m confused. Should the method be a GET.

I wanted to make sure to make sure I can get the data in my application and thought I’d reference this specific MongoDB example: Realm API endpoint test with Postman

Thanks in advance

Hey Deen, welcome to the forums! :wave:

To be clear - Realm webhooks support all the standard/common HTTP methods so you could definitely make a GET endpoint instead of a POST. It all depends on your app and use case.

In this instance, Mike used a POST endpoint simply because that’s the default method. The actual example just returns some documents and doesn’t use the POST body so you could totally use a GET instead like you suggested.

1 Like

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