Skip to content

Commit

Permalink
Refactored code.
Browse files Browse the repository at this point in the history
Added package for classic apis.
  • Loading branch information
sagaofsilence committed Mar 25, 2024
1 parent 979c8d6 commit 1cfab36
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.handler;
package io.refactoring.http5.client.example.classic.handler;

import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.refactoring.http5.client.example.helper;
package io.refactoring.http5.client.example.classic.helper;

import io.refactoring.http5.client.example.util.JsonUtils;
import io.refactoring.http5.client.example.classic.util.JsonUtils;
import lombok.extern.slf4j.Slf4j;

/** Base HTTP request handler. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.refactoring.http5.client.example.helper;
package io.refactoring.http5.client.example.classic.helper;

import io.refactoring.http5.client.example.interceptor.CustomHttpExecutionInterceptor;
import io.refactoring.http5.client.example.interceptor.CustomHttpRequestInterceptor;
import io.refactoring.http5.client.example.interceptor.CustomHttpResponseInterceptor;
import io.refactoring.http5.client.example.classic.interceptor.CustomHttpExecutionInterceptor;
import io.refactoring.http5.client.example.classic.interceptor.CustomHttpRequestInterceptor;
import io.refactoring.http5.client.example.classic.interceptor.CustomHttpResponseInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.apache.hc.client5.http.HttpRoute;
import org.apache.hc.client5.http.config.RequestConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.helper;
package io.refactoring.http5.client.example.classic.helper;

import io.refactoring.http5.client.example.RequestProcessingException;
import java.net.URI;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.helper;
package io.refactoring.http5.client.example.classic.helper;

import io.refactoring.http5.client.example.RequestProcessingException;
import io.refactoring.http5.client.example.model.User;
Expand All @@ -8,8 +8,8 @@
import java.text.MessageFormat;
import java.util.Map;

import io.refactoring.http5.client.example.handler.DataObjectResponseHandler;
import io.refactoring.http5.client.example.util.UserRequestProcessingUtils;
import io.refactoring.http5.client.example.classic.handler.DataObjectResponseHandler;
import io.refactoring.http5.client.example.classic.util.UserRequestProcessingUtils;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.apache.hc.client5.http.classic.methods.HttpGet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.interceptor;
package io.refactoring.http5.client.example.classic.interceptor;

import io.refactoring.http5.client.example.RequestProcessingException;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.interceptor;
package io.refactoring.http5.client.example.classic.interceptor;

import java.io.IOException;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.interceptor;
package io.refactoring.http5.client.example.classic.interceptor;

import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package io.refactoring.http5.client.example.util;
package io.refactoring.http5.client.example.classic.util;

import java.net.URISyntaxException;

import io.refactoring.http5.client.example.util.ConfigurationUtils;
import lombok.NonNull;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpHost;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.refactoring.http5.client.example.util;
package io.refactoring.http5.client.example.classic.util;

import java.net.URI;
import java.net.URISyntaxException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.refactoring.http5.client.example.classic;

import io.refactoring.http5.client.example.BaseExampleTests;
import io.refactoring.http5.client.example.util.JsonUtils;
import io.refactoring.http5.client.example.classic.util.JsonUtils;

abstract class BaseClassicExampleTests extends BaseExampleTests {
protected final JsonUtils jsonUtils = new JsonUtils();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import static org.assertj.core.api.Assertions.assertThat;

import io.refactoring.http5.client.example.helper.UserSimpleHttpRequestHelper;
import io.refactoring.http5.client.example.classic.helper.UserSimpleHttpRequestHelper;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.hc.core5.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import io.refactoring.http5.client.example.model.User;
import io.refactoring.http5.client.example.model.UserPage;
import io.refactoring.http5.client.example.helper.UserTypeHttpRequestHelper;
import io.refactoring.http5.client.example.classic.helper.UserTypeHttpRequestHelper;
import java.util.Map;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.refactoring.http5.client.example.util;

import io.refactoring.http5.client.example.helper.HttpConfigurationHelper;
import io.refactoring.http5.client.example.classic.helper.HttpConfigurationHelper;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.junit.jupiter.api.Test;

Expand Down

0 comments on commit 1cfab36

Please sign in to comment.