Closed falvhb closed 8 years ago
Hi! Thanks for letting us know!
Our compression service is offered only with a secured HTTPS connection. If you are required to use a proxy server, then this is typically done with a CONNECT
request (see https://tools.ietf.org/html/rfc2616#section-9.9), which opens a TCP tunnel through the HTTP proxy.
The support for this is not available in our client. If you wish to make this work then you have to do your own HTTP requests. Our HTTP API is simple enough, so that should not be a problem. You can view examples in our Node.js client or on our HTTP API reference page: https://tinypng.com/developers/reference
Support for using HTTPS connections over proxies is available in some generic HTTP client libraries like request (https://github.com/request/request#proxies).
We'd love to hear from you how this goes!
You might be pleased to know that it is possible as of version 1.4 to configure a proxy with the API client directly.
Tinify.proxy = "http://proxy.de:80"
...
We are behind a company firewall and can not use the package as of now.
I tried to patch the package in Client.js:
but this caused an error I do not understand:
Error
Thanks!