Skip to content

Commit 172f7c5

Browse files
Merge pull request #35 from skyflowapi/release/29.03.2022
Release/29.03.2022
2 parents f014246 + 2b382ca commit 172f7c5

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
5+
## [1.4.1] - 2022-03-29
6+
7+
### Fixed
8+
- Request headers not getting overriden due to case sensitivity
9+
410
## [1.4.0] - 2022-03-15
511

612
### Changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This Java SDK is designed to help developers easily implement Skyflow into their
3737

3838
Add this dependency to your project's build file:
3939
```
40-
implementation 'com.skyflow:skyflow-java:1.4.0'
40+
implementation 'com.skyflow:skyflow-java:1.4.1'
4141
```
4242

4343
#### Maven users
@@ -47,7 +47,7 @@ Add this dependency to your project's POM:
4747
<dependency>
4848
<groupId>com.skyflow</groupId>
4949
<artifactId>skyflow-java</artifactId>
50-
<version>1.4.0</version>
50+
<version>1.4.1</version>
5151
</dependency>
5252
```
5353
---
@@ -148,7 +148,7 @@ records.put("records", recordsArray);
148148
InsertOptions insertOptions = new InsertOptions(true);
149149

150150
```
151-
An Example of insert call
151+
An [example](https://github.com/skyflowapi/skyflow-java/blob/master/samples/src/main/java/com/example/InsertExample.java) of insert call
152152
```java
153153
JSONObject recordsJson = new JSONObject();
154154
JSONArray recordsArrayJson = new JSONArray();
@@ -202,7 +202,7 @@ recordsArrayJson.put(tokenJSon);
202202

203203
recordsJson.put("records",recordsArrayJson);
204204
```
205-
An Example of detokenize call
205+
An [example](https://github.com/skyflowapi/skyflow-java/blob/master/samples/src/main/java/com/example/DetokenizeExample.java) of detokenize call
206206
```java
207207
JSONObject recordsJson = new JSONObject();
208208

@@ -273,7 +273,7 @@ There are 4 accepted values in RedactionType:
273273
- `REDACTED`
274274
- `DEFAULT`
275275

276-
An Example getById call
276+
An [example](https://github.com/skyflowapi/skyflow-java/blob/master/samples/src/main/java/com/example/GetByIdExample.java) getById call
277277
```java
278278
import com.skyflow.entities.RedactionType;
279279

@@ -384,7 +384,7 @@ invokeConfig.put("requestBody", requestBodyJson);
384384

385385
**pathParams, queryParams, requestHeader, requestBody** are the JSON objects that will be sent through the connection integration url.
386386

387-
An example of invokeConnection:
387+
An [example](https://github.com/skyflowapi/skyflow-java/blob/master/samples/src/main/java/com/example/InvokeConnectionExample.java) of invokeConnection:
388388
```java
389389
JSONObject invokeConfig = new JSONObject();
390390
invokeConfig.put("connectionURL", "<your_connection_url>");

pom.xml

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

77
<groupId>com.skyflow</groupId>
88
<artifactId>skyflow-java</artifactId>
9-
<version>1.4.0</version>
9+
<version>1.4.1</version>
1010
<packaging>jar</packaging>
1111

1212
<name>${project.groupId}:${project.artifactId}</name>

samples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.skyflow</groupId>
2020
<artifactId>skyflow-java</artifactId>
21-
<version>1.4.0</version>
21+
<version>1.4.1</version>
2222
</dependency>
2323

2424
</dependencies>

src/main/java/com/skyflow/common/utils/Helpers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static Map<String, String> constructConnectionHeadersMap(JSONObject confi
129129
Map<String, String> headersMap = new HashMap<>();
130130
for (Object key : configHeaders.keySet()) {
131131
Object value = configHeaders.get(key);
132-
headersMap.put((String) key, (String) value);
132+
headersMap.put(((String) key).toLowerCase(), (String) value);
133133
}
134134
return headersMap;
135135
}

src/main/java/com/skyflow/common/utils/HttpUtility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static String sendRequest(String method, String requestUrl, JSONObject pa
2020
URL url = new URL(requestUrl);
2121
connection = (HttpURLConnection) url.openConnection();
2222
connection.setRequestMethod(method);
23-
connection.setRequestProperty("Content-Type", "application/json");
23+
connection.setRequestProperty("content-type", "application/json");
2424

2525
if (headers != null && headers.size() > 0) {
2626
for (Map.Entry<String, String> entry : headers.entrySet()) {

src/main/java/com/skyflow/vault/Skyflow.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ public JSONObject invokeConnection(JSONObject connectionConfig) throws SkyflowEx
209209
if (connectionConfig.containsKey("requestHeader")) {
210210
headers = Helpers.constructConnectionHeadersMap((JSONObject) connectionConfig.get("requestHeader"));
211211
}
212-
if(!headers.containsKey("X-Skyflow-Authorization")) {
213-
headers.put("X-Skyflow-Authorization", TokenUtils.getBearerToken(configuration.getTokenProvider()));
212+
if(!headers.containsKey("x-skyflow-authorization")) {
213+
headers.put("x-skyflow-authorization", TokenUtils.getBearerToken(configuration.getTokenProvider()));
214214
}
215215

216216
String requestMethod = connectionConfig.get("methodName").toString();

0 commit comments

Comments
 (0)