dlt-hub / dlt

data load tool (dlt) is an open source Python library that makes data loading easy 🛠️
https://dlthub.com/docs
Apache License 2.0
2.64k stars 175 forks source link

rest_api: extend the endpoint configuration allowing to pass `data` for the POST requests #1878

Open francescomucio opened 6 months ago

francescomucio commented 6 months ago

Source name

rest_api

Describe the data you'd like to see

GraphQL APIs and in general endpoints used with the POST method, requires additional data to be passed in the body of the requests (in the case of graphQL APIs, this data will be the query for the endpoint).

What we need:

I would be nice to validate that POST requests have the data parameter, but I am wondering if out there there are weird POST apis which need no body

Are you a dlt user?

Yes, I'm already a dlt user.

Do you ready to contribute this extension?

Yes, I'm ready.

dlt destination

all

Additional information

No response

burnash commented 6 months ago

Hey @francescomucio I think it's already partly implemented in https://github.com/dlt-hub/verified-sources/pull/431. Could you take a look and see if this can work for you? By the way I was thinking that maybe for GraphQL we'd need another "source", parallel to rest_api.