Skip to content

Commit

Permalink
Merge pull request #117 from Bandwidth/SWI-4482
Browse files Browse the repository at this point in the history
SWI-4482 Content Type header in UploadMedia
  • Loading branch information
brianluisgomez authored Feb 9, 2024
2 parents ba67449 + 22b77ae commit e826357
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.bandwidth.sdk</groupId>
<artifactId>bandwidth-sdk</artifactId>
<version>9.0.0</version>
<version>9.1.1</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -56,7 +56,7 @@ Add this dependency to your project's build file:
}
dependencies {
implementation "com.bandwidth.sdk:bandwidth-sdk:9.0.0"
implementation "com.bandwidth.sdk:bandwidth-sdk:9.1.1"
}
```

Expand All @@ -70,7 +70,7 @@ mvn clean package

Then manually install the following JARs:

* `target/bandwidth-sdk-9.0.0.jar`
* `target/bandwidth-sdk-9.1.1.jar`
* `target/lib/*.jar`

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'com.bandwidth.sdk'
version = '9.0.0'
version = '9.1.1'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.bandwidth.sdk",
name := "bandwidth-sdk",
version := "9.0.0",
version := "9.1.1",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
2 changes: 1 addition & 1 deletion openapi-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
artifactId: bandwidth-sdk
artifactVersion: 9.0.0
artifactVersion: 9.1.1
artifactDescription: The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs
artifactUrl: https://github.com/Bandwidth/java-sdk
developerEmail: [email protected]
Expand Down
11 changes: 8 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>bandwidth-sdk</artifactId>
<packaging>jar</packaging>
<name>bandwidth-sdk</name>
<version>9.0.0</version>
<version>9.1.1</version>
<url>https://github.com/Bandwidth/java-sdk</url>
<description>The official client SDK for Bandwidth&#39;s Voice, Messaging, MFA, and WebRTC APIs</description>
<scm>
Expand Down Expand Up @@ -292,7 +292,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -326,6 +326,11 @@
<artifactId>logging-interceptor</artifactId>
<version>${okhttp-version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.19.4</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down Expand Up @@ -419,7 +424,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/bandwidth/sdk/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void init() {
json = new JSON();

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

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/bandwidth/sdk/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

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

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
10 changes: 6 additions & 4 deletions src/main/java/com/bandwidth/sdk/api/MediaApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,12 @@ public okhttp3.Call uploadMediaCall(String accountId, String mediaId, File body,
"video/webm",
"video/x-ms-wmv"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
if (contentType == null) {
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
};

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

0 comments on commit e826357

Please sign in to comment.