Hi I have created a custom extractor from the tuto...
# getting-started
t
Hi I have created a custom extractor from the tutorials/custom-extractor example. However, I am getting and error and "http_status_code": 404, "status": "failed". When I run it. I believe the issue is the default call is a GET and I need it to be a POST. How do I alter the extractor to make a POST call? Thank you for any help
h
I struggled to find this too — There is a property you can set in the stream class:
Copy code
class FlowsStream(prefectStream):
Copy code
name = "flows"
    rest_method = "POST"
    records_jsonpath = "$.[*]"
e
Indeed a gap in the SDK docs. Should be fixed by https://github.com/meltano/sdk/pull/1824
Thanks for calling it out!
t
Thank you Henning that worked. Although I am now getting a different error 400 Bad request. But that is because it isn't picking up the parameters that I am trying to pass. Works in Postman when they are defined in the Body section. Do you know how to pass a body { "report_type": "REPORT1", "store_uuids": ["09be0c94-eb15-487f-b7f7-a36b596f0a002348-986"], "start_date" : "2023-07-07", "end_date" : "2023-07-07" } Thanks again for any help
e
@tim_manger you want to override prepare_request_payload for that
t
Thank you Edgar prepare_request_payload worked