diff options
author | Tor Egge <tegge@oath.com> | 2018-11-02 12:51:49 +0000 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-01-23 21:40:11 +0100 |
commit | 7cd58a54649ede70ecff97fb166aa82bb90b3b4c (patch) | |
tree | eb28a6c926144b8d53ff1e337b954c11a47406fb /vespa-http-client | |
parent | b936026bdd8c7b34d5f8dcddf7d63c491753c840 (diff) |
Switch default data format for vespa http client to json.
Diffstat (limited to 'vespa-http-client')
3 files changed, 3 insertions, 3 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java index 17b32929eac..4adf3912dbd 100644 --- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java +++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java @@ -39,7 +39,7 @@ public final class FeedParams { * Mutable class used to instantiate a {@link FeedParams}. */ public static final class Builder { - private DataFormat dataFormat = DataFormat.XML_UTF8; + private DataFormat dataFormat = DataFormat.JSON_UTF8; private long serverTimeout = TimeUnit.SECONDS.toMillis(180); private long clientTimeout = TimeUnit.SECONDS.toMillis(20); private String route = null; diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java index f2dd9a44878..3af73dbf47a 100644 --- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java +++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java @@ -20,7 +20,7 @@ public class FeedParamsTest { public void testDefaults() { FeedParams params = new FeedParams.Builder().build(); - assertThat(params.getDataFormat(), equalTo(FeedParams.DataFormat.XML_UTF8)); + assertThat(params.getDataFormat(), equalTo(FeedParams.DataFormat.JSON_UTF8)); assertThat(params.getMaxChunkSizeBytes(), is(50 * 1024)); assertThat(params.getRoute(), nullValue()); assertThat(params.getServerTimeout(TimeUnit.SECONDS), is(180L)); diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java index 1e2d37884ef..fa14a276445 100644 --- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java +++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java @@ -192,7 +192,7 @@ public class ApacheGatewayConnectionTest { @Test public void testCompressedWriteOperations() throws Exception { final Endpoint endpoint = Endpoint.create("hostname", 666, false); - final FeedParams feedParams = new FeedParams.Builder().build(); + final FeedParams feedParams = new FeedParams.Builder().setDataFormat(FeedParams.DataFormat.XML_UTF8).build(); final String clusterSpecificRoute = ""; final ConnectionParams connectionParams = new ConnectionParams.Builder() .setUseCompression(true) |