Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #48 from amagar088/master
Browse files Browse the repository at this point in the history
added user-agent to track calls made from this SDK
  • Loading branch information
amagar088 authored Aug 10, 2016
2 parents 36691a3 + b7a4a03 commit 72ee187
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/exacttarget/fuelsdk/ETRestConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ private HttpURLConnection sendRequest(URL url, Method method, String payload)
case GET:
connection.setDoInput(true);
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("User-Agent", "FuelSDK-Java");
break;
case POST:
case PATCH:
case DELETE:
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("User-Agent", "FuelSDK-Java");
break;
default:
throw new ETSdkException("unsupported request method: " + method.toString());
Expand Down

0 comments on commit 72ee187

Please sign in to comment.