diff options
Diffstat (limited to 'hosted-api')
-rw-r--r-- | hosted-api/pom.xml | 2 | ||||
-rw-r--r-- | hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/hosted-api/pom.xml b/hosted-api/pom.xml index 3ca8c3c5fd5..597cd57f8dd 100644 --- a/hosted-api/pom.xml +++ b/hosted-api/pom.xml @@ -17,11 +17,13 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>config-provisioning</artifactId> <version>${project.version}</version> + <scope>provided</scope> </dependency> <dependency> <groupId>com.yahoo.vespa</groupId> <artifactId>vespajlib</artifactId> <version>${project.version}</version> + <scope>provided</scope> </dependency> <dependency> diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java b/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java index 6b2f5596fd6..0dde6fd3bde 100644 --- a/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java +++ b/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java @@ -39,8 +39,8 @@ public class MultiPartStreamer { } /** Adds the given data as a named part in this, using the {@code "text/plain"} content type. */ - public MultiPartStreamer addText(String name, String json) { - return addData(name, "text/plain", json); + public MultiPartStreamer addText(String name, String text) { + return addData(name, "text/plain", text); } /** Adds the given data as a named part in this, using the {@code "application/json"} content type. */ @@ -57,9 +57,9 @@ public class MultiPartStreamer { } /** Adds the given data as a named part in this, using the {@code "application/octet-stream" content type}. */ - public MultiPartStreamer addBytes(String name, byte[] data) { + public MultiPartStreamer addBytes(String name, byte[] bytes) { streams.add(() -> separator(name, "application/octet-stream")); - streams.add(() -> new ByteArrayInputStream(data)); + streams.add(() -> new ByteArrayInputStream(bytes)); return this; } |