Skip to content

Commit 49ac1cc

Browse files
committed
- fixes a bug where url options would be inserted twice for collection POST requests
1 parent 970c882 commit 49ac1cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Templates/Java/requests_extensions/BaseEntityCollectionReferenceRequest.java.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ import <#=mainNamespace#>.<#=c.GetPackagePrefix()#>.<#=c.TypeName()#>;
4242
final String requestUrl = getBaseRequest().getRequestUrl().toString();
4343
final ReferenceRequestBody body = new ReferenceRequestBody(getBaseRequest().getClient().getServiceRoot() + "/<#=prop#>/<#=implicitNavigationProperty#>" + new<#=c.TypeName()#>.id);
4444
new <#=c.TypeWithReferencesRequestBuilder()#>(requestUrl, getBaseRequest().getClient(), /* Options */ null)
45-
.buildRequest(getBaseRequest().getOptions())
45+
.buildRequest(getBaseRequest().getHeaders())
4646
.post(new<#=c.TypeName()#>, body, callback);
4747
}
4848

4949
public <#=c.TypeName()#> post(final <#=c.TypeName()#> new<#=c.TypeName()#>) throws ClientException {
5050
final String requestUrl = getBaseRequest().getRequestUrl().toString();
5151
final ReferenceRequestBody body = new ReferenceRequestBody(getBaseRequest().getClient().getServiceRoot() + "/<#=prop#>/<#=implicitNavigationProperty#>" + new<#=c.TypeName()#>.id);
5252
return new <#=c.TypeWithReferencesRequestBuilder()#>(requestUrl,getBaseRequest().getClient(), /* Options */ null)
53-
.buildRequest(getBaseRequest().getOptions())
53+
.buildRequest(getBaseRequest().getHeaders())
5454
.post(new<#=c.TypeName()#>, body);
5555
}
5656
<# }

Templates/Java/requests_extensions/BaseEntityCollectionRequest.java.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ import <#=mainNamespace#>.<#=TypeHelperJava.GetPrefixForRequests()#>.<#=c.TypeCo
5353
public void post(final <#=c.TypeName()#> new<#=c.TypeName()#>, final ICallback<<#=c.TypeName()#>> callback) {
5454
final String requestUrl = getBaseRequest().getRequestUrl().toString();
5555
new <#=c.TypeRequestBuilder()#>(requestUrl, getBaseRequest().getClient(), /* Options */ null)
56-
.buildRequest(getBaseRequest().getOptions())
56+
.buildRequest(getBaseRequest().getHeaders())
5757
.post(new<#=c.TypeName()#>, callback);
5858
}
5959

6060
public <#=c.TypeName()#> post(final <#=c.TypeName()#> new<#=c.TypeName()#>) throws ClientException {
6161
final String requestUrl = getBaseRequest().getRequestUrl().toString();
6262
return new <#=c.TypeRequestBuilder()#>(requestUrl, getBaseRequest().getClient(), /* Options */ null)
63-
.buildRequest(getBaseRequest().getOptions())
63+
.buildRequest(getBaseRequest().getHeaders())
6464
.post(new<#=c.TypeName()#>);
6565
}
6666

0 commit comments

Comments
 (0)