jemgold / figma-js

Little wrapper (+ types) for the Figma API
https://jongold.github.io/figma-js/
MIT License
490 stars 47 forks source link

feat: add support of http agents and proxy #61

Open louizo opened 1 year ago

louizo commented 1 year ago

Add the possibility to provide a custom http agent on figma-js client instantiation. This allows figma-js to be used in different environments (proxy,...)

The current version of figma-js can only be used with a direct internet connection. In specific cases such as in a company environment (example: need a proxy to connect internet), figma-js does not work.

Allowing a client to change http_agent, https_agent, or/and proxy values of axios configuration enables developers to make clients that work in more environments, such as (but not limited to) using http_proxy environment if present to connect via proxy.

Figma-js interface is kept the same (new values are optional), so it is backward compatible.

jasonmaire commented 1 year ago

I would love to see this PR merged! Very useful for me as well.