-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1602 from marklogic/release/6.3.0
Merging release/6.3.0 into master
- Loading branch information
Showing
67 changed files
with
1,351 additions
and
1,211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default owners for everything in the repo. | ||
* @anu3990 @billfarber @rjrudin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
examples/src/main/java/com/marklogic/client/example/cookbook/ConfigureOkHttp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.marklogic.client.example.cookbook; | ||
|
||
import com.marklogic.client.DatabaseClientFactory; | ||
import com.marklogic.client.extra.okhttpclient.OkHttpClientConfigurator; | ||
import okhttp3.OkHttpClient; | ||
import okhttp3.Request; | ||
|
||
/** | ||
* Provides examples of configuring the underlying OkHttp client for various use cases. | ||
*/ | ||
public class ConfigureOkHttp { | ||
|
||
/** | ||
* OkHttp 4.x includes a header of "Accept-Encoding=gzip" by default. The following shows how to use an OkHttp | ||
* interceptor to remove this header from every request. By doing this via a configurator passed to | ||
* {@code DatabaseClientFactory}, every {@code DatabaseClient} created via the factory will inherit this | ||
* interceptor. | ||
* | ||
* Note that while the Accept-Encoding header can contain multiple values - see | ||
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding for examples - the MarkLogic Java | ||
* Client does not set this header and OkHttp only sets it to "gzip" for every request. Thus, removing the | ||
* header should not result in losing any other values besides "gzip" for the header. You are free to | ||
* customize this as you wish though; this is primarily intended as an example for how to customize OkHttp | ||
* when using the MarkLogic Java Client. | ||
* | ||
* As of Java Client 6.3.0, this can now be accomplished via the {@code DatabaseClientFactory} class and | ||
* {@code RemoveAcceptEncodingConfigurator}. | ||
*/ | ||
public static void removeAcceptEncodingGzipHeader() { | ||
DatabaseClientFactory.addConfigurator(new OkHttpClientConfigurator() { | ||
@Override | ||
public void configure(OkHttpClient.Builder builder) { | ||
builder.addNetworkInterceptor(chain -> { | ||
Request newRequest = chain.request().newBuilder().removeHeader("Accept-Encoding").build(); | ||
return chain.proceed(newRequest); | ||
}); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.