Clean up
This commit is contained in:
parent
8094d72314
commit
59f5eeb3c4
|
@ -90,13 +90,10 @@ public class SimpleHTTPClient {
|
|||
setHeaders(c);
|
||||
c.setInstanceFollowRedirects(false);
|
||||
|
||||
int responseCode = c.getResponseCode();
|
||||
System.out.println("Processing response code "+ responseCode);
|
||||
switch (responseCode) {
|
||||
switch (c.getResponseCode()) {
|
||||
case HttpURLConnection.HTTP_MOVED_PERM:
|
||||
case HttpURLConnection.HTTP_MOVED_TEMP:
|
||||
case 308: // Same as HTTP_MOVED_PERM, but does not allow changing the request method from POST to GET
|
||||
System.out.println("Processing redirect to "+c.getHeaderField("Location"));
|
||||
String location = c.getHeaderField("Location");
|
||||
location = URLDecoder.decode(location, "UTF-8");
|
||||
URL base = new URL(url);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.hl7.fhir.utilities;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -16,7 +15,6 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
public class SimpleHTTPClientTest {
|
||||
|
|
Loading…
Reference in New Issue