Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #81 from veena-udayabhanu/master
Browse files Browse the repository at this point in the history
Added x-ms-version header for all requests
  • Loading branch information
vinaysh-msft committed Oct 15, 2014
2 parents 4129963 + 547a92e commit a898a82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Lib/ClassLibraryCommon/Core/Executor/Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,9 @@ private static void ProcessStartOfRequest<T>(ExecutionState<T> executionState, s
Uri transformedUri = executionState.RestCMD.Credentials.TransformUri(uri);
Logger.LogInformational(executionState.OperationContext, startLogMessage, transformedUri);
UriQueryBuilder builder = new UriQueryBuilder(executionState.RestCMD.Builder);
executionState.Req = executionState.RestCMD.BuildRequestDelegate(transformedUri, builder, executionState.Cmd.ServerTimeoutInSeconds, !executionState.RestCMD.Credentials.IsSAS, executionState.OperationContext);

// Note - The service accepts both api-version and x-ms-version and therefore it is ok to add x-ms-version to all requests.
executionState.Req = executionState.RestCMD.BuildRequestDelegate(transformedUri, builder, executionState.Cmd.ServerTimeoutInSeconds, true, executionState.OperationContext);
executionState.CancelDelegate = executionState.Req.Abort;

// 2. Set Headers
Expand Down
3 changes: 2 additions & 1 deletion Lib/WindowsRuntime/Core/Executor/Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ private async static Task<T> ExecuteAsyncInternal<T>(RESTCommand<T> cmd, IRetryP
bool shouldRetry = false;
TimeSpan delay = TimeSpan.Zero;

// Note - The service accepts both api-version and x-ms-version and therefore it is ok to add x-ms-version to all requests.
// Create a new client
HttpClient client = cmd.BuildClient(cmd, cmd.Handler, !cmd.Credentials.IsSAS, executionState.OperationContext);
HttpClient client = cmd.BuildClient(cmd, cmd.Handler, true, executionState.OperationContext);
client.Timeout = TimeSpan.FromMilliseconds(int.MaxValue);

do
Expand Down

0 comments on commit a898a82

Please sign in to comment.