Skip to content

Commit 3c72408

Browse files
committed
make JDKHttpClient implement sync execute methods from HttpClient
1 parent a69f9de commit 3c72408

50 files changed

Lines changed: 135 additions & 88 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/AWeberExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
1212
import java.io.IOException;
13+
import java.util.concurrent.ExecutionException;
1314

1415
public final class AWeberExample {
1516

@@ -22,7 +23,7 @@ public final class AWeberExample {
2223
private AWeberExample() {
2324
}
2425

25-
public static void main(String... args) throws IOException {
26+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2627
final OAuth10aService service = new ServiceBuilder()
2728
.apiKey(CONSUMER_KEY)
2829
.apiSecret(CONSUMER_SECRET)

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/Box20Example.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.io.IOException;
1313
import java.util.HashMap;
1414
import java.util.Map;
15+
import java.util.concurrent.ExecutionException;
1516

1617
public final class Box20Example {
1718

@@ -21,7 +22,7 @@ public final class Box20Example {
2122
private Box20Example() {
2223
}
2324

24-
public static void main(String... args) throws IOException {
25+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2526
//Replace these with your client id and secret
2627
final String clientId = "your client id";
2728
final String clientSecret = "your client secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/DiggExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
1212
import java.io.IOException;
13+
import java.util.concurrent.ExecutionException;
1314

1415
public final class DiggExample {
1516

@@ -19,7 +20,7 @@ public final class DiggExample {
1920
private DiggExample() {
2021
}
2122

22-
public static void main(String... args) throws IOException {
23+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2324
// Replace these with your own api key and secret
2425
final String apiKey = "myKey";
2526
final String apiSecret = "mySecret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FacebookExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth20Service;
1212
import java.io.IOException;
13+
import java.util.concurrent.ExecutionException;
1314

1415
public final class FacebookExample {
1516

@@ -19,7 +20,7 @@ public final class FacebookExample {
1920
private FacebookExample() {
2021
}
2122

22-
public static void main(String... args) throws IOException {
23+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2324
// Replace these with your client id and secret
2425
final String clientId = "your client id";
2526
final String clientSecret = "your client secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FlickrExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
1212
import java.io.IOException;
13+
import java.util.concurrent.ExecutionException;
1314

1415
public final class FlickrExample {
1516

@@ -18,7 +19,7 @@ public final class FlickrExample {
1819
private FlickrExample() {
1920
}
2021

21-
public static void main(String... args) throws IOException {
22+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2223
// Replace these with your own api key and secret
2324
final String apiKey = "your_app_id";
2425
final String apiSecret = "your_api_secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/Foursquare2Example.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.github.scribejava.core.model.Verb;
1010
import com.github.scribejava.core.oauth.OAuth20Service;
1111
import java.io.IOException;
12+
import java.util.concurrent.ExecutionException;
1213

1314
public final class Foursquare2Example {
1415

@@ -18,7 +19,7 @@ public final class Foursquare2Example {
1819
private Foursquare2Example() {
1920
}
2021

21-
public static void main(String... args) throws IOException {
22+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2223
// Replace these with your own api key and secret
2324
final String apiKey = "your client id";
2425
final String apiSecret = "your client secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FoursquareExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth10aService;
1212
import java.io.IOException;
13+
import java.util.concurrent.ExecutionException;
1314

1415
public final class FoursquareExample {
1516

@@ -18,7 +19,7 @@ public final class FoursquareExample {
1819
private FoursquareExample() {
1920
}
2021

21-
public static void main(String... args) throws IOException {
22+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2223
final OAuth10aService service = new ServiceBuilder()
2324
.apiKey("your client id")
2425
.apiSecret("your client secret")

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/FreelancerExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.github.scribejava.core.model.Verb;
1212
import com.github.scribejava.core.oauth.OAuth10aService;
1313
import java.io.IOException;
14+
import java.util.concurrent.ExecutionException;
1415

1516
public final class FreelancerExample {
1617

@@ -23,7 +24,7 @@ public final class FreelancerExample {
2324
private FreelancerExample() {
2425
}
2526

26-
public static void main(String... args) throws IOException {
27+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2728
final OAuth10aService service = new ServiceBuilder()
2829
.signatureType(SignatureType.QueryString)
2930
.apiKey("your client id")

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/GeniusExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth20Service;
1212
import java.io.IOException;
13+
import java.util.concurrent.ExecutionException;
1314

1415
public final class GeniusExample {
1516

@@ -19,7 +20,7 @@ public final class GeniusExample {
1920
private GeniusExample() {
2021
}
2122

22-
public static void main(String... args) throws IOException {
23+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2324
// Replace these with your client id and secret
2425
final String clientId = "your client id";
2526
final String clientSecret = "your client secret";

scribejava-apis/src/test/java/com/github/scribejava/apis/examples/GitHubExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.github.scribejava.core.model.Verb;
1111
import com.github.scribejava.core.oauth.OAuth20Service;
1212
import java.io.IOException;
13+
import java.util.concurrent.ExecutionException;
1314

1415
public final class GitHubExample {
1516

@@ -19,7 +20,7 @@ public final class GitHubExample {
1920
private GitHubExample() {
2021
}
2122

22-
public static void main(String... args) throws IOException {
23+
public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
2324
// Replace these with your client id and secret
2425
final String clientId = "your client id";
2526
final String clientSecret = "your client secret";

0 commit comments

Comments
 (0)