Skip to content

Commit e826357

Browse files
Merge pull request #117 from Bandwidth/SWI-4482
SWI-4482 Content Type header in UploadMedia
2 parents ba67449 + 22b77ae commit e826357

File tree

8 files changed

+22
-15
lines changed

8 files changed

+22
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Add this dependency to your project's POM:
4040
<dependency>
4141
<groupId>com.bandwidth.sdk</groupId>
4242
<artifactId>bandwidth-sdk</artifactId>
43-
<version>9.0.0</version>
43+
<version>9.1.1</version>
4444
<scope>compile</scope>
4545
</dependency>
4646
```
@@ -56,7 +56,7 @@ Add this dependency to your project's build file:
5656
}
5757
5858
dependencies {
59-
implementation "com.bandwidth.sdk:bandwidth-sdk:9.0.0"
59+
implementation "com.bandwidth.sdk:bandwidth-sdk:9.1.1"
6060
}
6161
```
6262

@@ -70,7 +70,7 @@ mvn clean package
7070

7171
Then manually install the following JARs:
7272

73-
* `target/bandwidth-sdk-9.0.0.jar`
73+
* `target/bandwidth-sdk-9.1.1.jar`
7474
* `target/lib/*.jar`
7575

7676
## Getting Started

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'java'
44
apply plugin: 'com.diffplug.spotless'
55

66
group = 'com.bandwidth.sdk'
7-
version = '9.0.0'
7+
version = '9.1.1'
88

99
buildscript {
1010
repositories {

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "com.bandwidth.sdk",
44
name := "bandwidth-sdk",
5-
version := "9.0.0",
5+
version := "9.1.1",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

openapi-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
artifactId: bandwidth-sdk
2-
artifactVersion: 9.0.0
2+
artifactVersion: 9.1.1
33
artifactDescription: The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs
44
artifactUrl: https://github.com/Bandwidth/java-sdk
55
developerEmail: [email protected]

pom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<artifactId>bandwidth-sdk</artifactId>
77
<packaging>jar</packaging>
88
<name>bandwidth-sdk</name>
9-
<version>9.0.0</version>
9+
<version>9.1.1</version>
1010
<url>https://github.com/Bandwidth/java-sdk</url>
1111
<description>The official client SDK for Bandwidth&#39;s Voice, Messaging, MFA, and WebRTC APIs</description>
1212
<scm>
@@ -292,7 +292,7 @@
292292
<dependency>
293293
<groupId>org.projectlombok</groupId>
294294
<artifactId>lombok</artifactId>
295-
<version>1.18.24</version>
295+
<version>1.18.30</version>
296296
<scope>provided</scope>
297297
</dependency>
298298
<dependency>
@@ -326,6 +326,11 @@
326326
<artifactId>logging-interceptor</artifactId>
327327
<version>${okhttp-version}</version>
328328
</dependency>
329+
<dependency>
330+
<groupId>com.sun.jersey</groupId>
331+
<artifactId>jersey-client</artifactId>
332+
<version>1.19.4</version>
333+
</dependency>
329334
<dependency>
330335
<groupId>com.google.code.gson</groupId>
331336
<artifactId>gson</artifactId>
@@ -419,7 +424,7 @@
419424
<dependency>
420425
<groupId>org.projectlombok</groupId>
421426
<artifactId>lombok</artifactId>
422-
<version>1.18.24</version>
427+
<version>1.18.30</version>
423428
<scope>provided</scope>
424429
</dependency>
425430
</dependencies>

src/main/java/com/bandwidth/sdk/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private void init() {
140140
json = new JSON();
141141

142142
// Set default User-Agent.
143-
setUserAgent("OpenAPI-Generator/9.0.0/java");
143+
setUserAgent("OpenAPI-Generator/9.1.1/java");
144144

145145
authentications = new HashMap<String, Authentication>();
146146
}

src/main/java/com/bandwidth/sdk/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
1717
public class Configuration {
18-
public static final String VERSION = "9.0.0";
18+
public static final String VERSION = "9.1.1";
1919

2020
private static ApiClient defaultApiClient = new ApiClient();
2121

src/main/java/com/bandwidth/sdk/api/MediaApi.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,12 @@ public okhttp3.Call uploadMediaCall(String accountId, String mediaId, File body,
677677
"video/webm",
678678
"video/x-ms-wmv"
679679
};
680-
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
681-
if (localVarContentType != null) {
682-
localVarHeaderParams.put("Content-Type", localVarContentType);
683-
}
680+
if (contentType == null) {
681+
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
682+
if (localVarContentType != null) {
683+
localVarHeaderParams.put("Content-Type", localVarContentType);
684+
}
685+
};
684686

685687
String[] localVarAuthNames = new String[] { "Basic" };
686688
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);

0 commit comments

Comments
 (0)