OpenFn / adaptors

The new home for OpenFn adaptors; re-usable connectors for the most common DPGs and DPI building blocks.
GNU General Public License v3.0
4 stars 8 forks source link

HTTP helpers: don't append auth if not using base url #665

Open josephjclark opened 2 weeks ago

josephjclark commented 2 weeks ago

Warning about an new antipattern that may be emerging in the new http adaptors

when you do a get, it'll assume you're using the backend and append headers and stuff. But you might be calling another system entirely.

Should the helpers assume a backend? Should there be a different http.get/common.get/util.get?

josephjclark commented 2 weeks ago

Maybe the generic helper should not be an operation because we're saying "you're on your own buddy"

josephjclark commented 4 days ago

Probably be strict and not allow absolute URLs from adaptor helpers

Then work out how to expose common http. Or just expose the existing legacy functions