Hi, I'm currently looking at generating a custom c...
# meltano-plugin-development
f
Hi, I'm currently looking at generating a custom connector using a http POST with a payload. I've been following the example set in https://docs.meltano.com/tutorials/custom-extractor/. However, this only relates to an http GET. Could let me know the best practice for a 'tap.py' and/or 'streams.py' implementation. Thank you very much for your support.
1
f
Thank you very much for the prompt reply
By any chance, would you have an example of the singer_sdk.RESTStream in a .py that implements a http Post with payload?
r
I don't know of any off the top of my head. It would probably look like
streams.py
Copy code
class MyStream(TapStream):
    http_method = "POST"

    def prepare_request_payload(self, context, next_page_token):
        return {
            "param1": "value",  // hard-coded
            "param2": self.config.get("setting"),  // from config
            "param3": next_page_token,  // from pagination
        }
f
THis is great thank you