sfu-db / dataprep

Open-source low code data preparation library in python. Collect, clean and visualization your data in python with a few lines of code.
http://dataprep.ai
MIT License
1.99k stars 203 forks source link

Customizable header for dataprep.connector requests #846

Open bofei-jing opened 2 years ago

bofei-jing commented 2 years ago

Is your feature request related to a problem? Please describe. I couldn't find a way to add custom header fields like User-Agent to query requests, as sometimes recommended or required by APIs. For example, Reddit API has rules like "Change your client's User-Agent string to something unique and descriptive".

Describe the solution you'd like Is it possible to:

  1. Add keyword argument to the Connector's query()method that would be filled into request headers.
  2. Add fields in the configuration file to populate request headers

Describe alternatives you've considered I had to write my own code for APIs that enforced strict header requirements.