[bisq-network/bisq] Refactor http client (#4942)

chimp1984 notifications at github.com
Mon Dec 14 01:43:17 CET 2020


Refactors and fixes HttpClient

Add support for POST (Needed for follow up PR)
Do not allow multiple requests before one request is completed
Use different httpClients for getFee and getPrice

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4942

-- Commit Summary --

  * Use Lombok setter and getters
  * Update toString method
  * Remove requestWithGETNoProxy methods from interface (not used outside)
  * Refactor: Extract method getSocks5Proxy
  * Refactor getSocks5Proxy method: Return early, make flow more clear
  * Rearrange: move method down
  * Add HttpMethod enum
  * Add baseUrl as param, extract variable
  * Improve logging
  * Rename httpclient (make it more distinct to Bisq Httpclient)
  * Add post method. Add doRequest method
  * Refactor: Rename 'requestWithGET' to 'get'
  * - Add hasPendingRequest() getter and block repeated requests
  * Check if we have a pending request and return if thats the case
  * Use dedicated HttpClient for fee requests
  * Fix incorrect checkArgument
  * Improve logs
  * Use @Singleton annotation instead of definition in module
  * Rename PriceNodeHttpClient to PriceHttpClient
  * Improve thread name
  * Improve log

-- File Changes --

    M core/src/main/java/bisq/core/btc/BitcoinModule.java (3)
    M core/src/main/java/bisq/core/notifications/MobileNotificationService.java (7)
    R core/src/main/java/bisq/core/provider/FeeHttpClient.java (6)
    A core/src/main/java/bisq/core/provider/PriceHttpClient.java (34)
    M core/src/main/java/bisq/core/provider/fee/FeeProvider.java (12)
    M core/src/main/java/bisq/core/provider/fee/FeeRequest.java (2)
    M core/src/main/java/bisq/core/provider/fee/FeeService.java (5)
    M core/src/main/java/bisq/core/provider/price/PriceFeedService.java (17)
    M core/src/main/java/bisq/core/provider/price/PriceProvider.java (2)
    M core/src/main/java/bisq/core/provider/price/PriceRequest.java (2)
    M core/src/main/java/bisq/core/trade/txproof/xmr/XmrTxProofRequest.java (7)
    M p2p/src/main/java/bisq/network/http/HttpClient.java (14)
    M p2p/src/main/java/bisq/network/http/HttpClientImpl.java (206)
    A p2p/src/main/java/bisq/network/http/HttpMethod.java (23)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4942.patch
https://github.com/bisq-network/bisq/pull/4942.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4942
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201213/fc130527/attachment-0001.htm>


More information about the bisq-github mailing list