Skip to content

Commit 8fa665b

Browse files
a-panizza_globantBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:feature/APIHeaderParms' into beta
1 parent 8ace6ca commit 8fa665b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

java/src/main/java/com/genexus/internet/GXRestAPIClient.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class GXRestAPIClient {
3131

3232
private String contentType = "application/json; charset=utf-8";
3333
static final String CONTENT_TYPE_LABEL = "Content-Type";
34-
static final String AUTHORIZTION_LABEL = "Authorization";
34+
static final String AUTHORIZATION_LABEL = "Authorization";
3535

3636
private JSONObject jsonResponse;
3737
private HashMap<String, String> queryVars = new HashMap<String, String>();
@@ -551,9 +551,8 @@ else if (jsonResponse.length() == 1 && jsonResponse.has("")) {
551551
}
552552

553553
public void addUploadFile(String filePath, String fileName) {
554-
httpClient.addFile(filePath, fileName);
555-
String mimeType = SpecificImplementation.Application.getContentType(filePath);
556-
contentType = mimeType;
554+
httpClient.addFile(filePath, fileName);
555+
contentType = SpecificImplementation.Application.getContentType(filePath);;
557556
}
558557

559558
public void RestExecute() {
@@ -588,7 +587,7 @@ public void RestExecute() {
588587
}
589588
}
590589
if (location.getAuthenticationMethod() == 4 && location.getAccessToken() != null && ! location.getAccessToken().trim().isEmpty()) {
591-
httpClient.addHeader(AUTHORIZTION_LABEL, location.getAccessToken());
590+
httpClient.addHeader(AUTHORIZATION_LABEL, location.getAccessToken());
592591
}
593592
if (headerVars.size() > 0) {
594593
for( Map.Entry<String, String> entry : headerVars.entrySet()) {

0 commit comments

Comments
 (0)