Skip to content

Commit

Permalink
Merge pull request #3 from panxl6/2024-07
Browse files Browse the repository at this point in the history
feat: remove local rate limit.
  • Loading branch information
panxl6 authored Jul 30, 2024
2 parents 552c889 + a20f33d commit b95ec8c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main/java/com/aftership/http/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public HttpClient(final RequestConfig requestConfig, String userAgent, String do
}

public Response makeRequest(final Request request) throws Exception {
if (rateLimit != null && rateLimit.isExceeded()) {
throw new ApiException(ErrorEnum.RATE_LIMIT_EXCEED.getCode(), ErrorEnum.CLIENT_RATE_LIMIT_EXCEED.getMessage());
}
HttpMethod method = request.getMethod();
RequestBuilder builder = RequestBuilder.create(method.toString())
.setUri(this.domain + request.getURL())
Expand All @@ -73,7 +70,6 @@ public Response makeRequest(final Request request) throws Exception {
try {
response = client.execute(builder.build());
HttpEntity entity = response.getEntity();
setRateLimiting(response);
return new Response(EntityUtils.toString(entity), response.getStatusLine().getStatusCode(), false);
} finally {
if (response != null) {
Expand Down

0 comments on commit b95ec8c

Please sign in to comment.