dlt icon indicating copy to clipboard operation
dlt copied to clipboard

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

Open francescomucio opened this issue 1 year ago • 1 comments

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:

  • [ ] A new argument for endpoint to pass the data.
  • [ ] For incremental resources the data should also be modified to load the most recent results

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

francescomucio avatar Apr 25 '24 11:04 francescomucio

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.

burnash avatar Apr 26 '24 12:04 burnash