Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/twilio/twilio-csharp into…
Browse files Browse the repository at this point in the history
… alpha
  • Loading branch information
jingming committed Feb 24, 2017
2 parents 6779c57 + 516aec1 commit bae2f96
Show file tree
Hide file tree
Showing 9 changed files with 309 additions and 251 deletions.
9 changes: 8 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
twilio-csharp Changelog
=======================

[2017-02-09] Version 5.0.0

[2017-02-24] Version 5.0.2-alpha1
--------------------------
- URL encode all parameters
- Remove erroneous JWT header in .NET 3.5


[2017-02-21] Version 5.0.1-alpha1
--------------------------
**New Major Version**

Expand Down
18 changes: 14 additions & 4 deletions src/Twilio/Http/Request.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text;
using Twilio.Rest;

#if !NET35
using System.Net;
#else
using System.Web;
#endif

namespace Twilio.Http
{
/// <summary>
Expand Down Expand Up @@ -116,9 +122,13 @@ private static string EncodeParameters(IEnumerable<KeyValuePair<string, string>>
else
{
result += "&";
}

result += pair.Key + "=" + pair.Value;
}

#if !NET35
result += WebUtility.UrlEncode(pair.Key) + "=" + WebUtility.UrlEncode(pair.Value);
#else
result += HttpUtility.UrlEncode(pair.Key) + "=" + HttpUtility.UrlEncode(pair.Value);
#endif
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion src/Twilio/JWT/BaseJwt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private string BuildToken(JwtHeader headers, JwtPayload payload)
#else
private Dictionary<string, object> BuildHeaders()
{
return new Dictionary<string, object> { { "typ", "JWT" } };
return new Dictionary<string, object>();
}

private Dictionary<string, object> BuildPayload()
Expand Down
2 changes: 1 addition & 1 deletion src/Twilio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

internal class AssemblyInfomation
{
public const string AssemblyInformationalVersion = "5.0.1-alpha1";
public const string AssemblyInformationalVersion = "5.0.2-alpha1";
}
2 changes: 1 addition & 1 deletion src/Twilio/Twilio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Copyright>Copyright © Twilio</Copyright>
<AssemblyTitle>Twilio</AssemblyTitle>
<NeutralLanguage>en-US</NeutralLanguage>
<VersionPrefix>5.0.1</VersionPrefix>
<VersionPrefix>5.0.2</VersionPrefix>
<VersionSuffix>alpha1</VersionSuffix>
<Authors>Twilio</Authors>
<NoWarn>$(NoWarn);CS1591</NoWarn>
Expand Down
Loading

0 comments on commit bae2f96

Please sign in to comment.