Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor how we make an http request with proxy
- 1. Net::HTTP::Proxy is obsolete - Refactor the current method to pass proxy arguments straight to Net::HTTP.new - [https://apidock.com/ruby/Net/HTTP/Proxy/class](https://apidock.com/ruby/Net/HTTP/Proxy/class) <- obsolete - [https://apidock.com/ruby/Net/HTTP/new/class](https://apidock.com/ruby/Net/HTTP/new/class) <- new way - This wil also make it easier to stub - 2. Tiktok parser seems to be making the http request from within the parser - We make an http request from tiktok_item.rb, get_tiktok_api_data: https://github.com/meedan/pender/blob/1cb4a2b8b9afbe49ef82407588716026d05da8b4/app/models/parser/tiktok_item.rb#L55C1-L63C8 - Here we are NOT using the proxy, we should be using it for tiktok - All http requests should be coming from the same place
- Loading branch information