Skip to content

Commit

Permalink
Merge pull request #62 from jgiacomini/develop
Browse files Browse the repository at this point in the history
Merge 1.5.5
  • Loading branch information
jgiacomini authored Oct 18, 2018
2 parents fe2b34a + e10dfac commit 934060e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Release notes
## 1.5.5
* Fix a bug on cURL listener (when body was null) the cURL request wasn't displayed

## 1.5.4
* Fix a bug on cURL listener
* Add the possibility to debug the lib with source link (https://www.hanselman.com/blog/ExploringNETCoresSourceLinkSteppingIntoTheSourceCodeOfNuGetPackagesYouDontOwn.aspx)
* Add 2 new supported media tye for json : "application/json-patch+json", "application/*+json"

## 1.5.3
* Fix null reference exception when adding 2 times te same header

Expand Down
2 changes: 2 additions & 0 deletions Tiny.RestClient/Formatters/Json/JsonFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public IEnumerable<string> SupportedMediaTypes
get
{
yield return "application/json";
yield return "application/json-patch+json";
yield return "application/*+json";
yield return "text/json";
yield return "text/x-json";
yield return "text/javascript";
Expand Down
6 changes: 4 additions & 2 deletions Tiny.RestClient/Listener/CurlListener/CurlListener.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
#define DEBUG
// We define debug symbol to be able to log in debug even if we are compiled in release mode
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
Expand Down Expand Up @@ -50,7 +52,7 @@ public async Task OnSendingRequestAsync(Uri uri, HttpMethod httpMethod, HttpRequ
var body = await GetBodyAsync(httpRequestMessage);

var bodyLenght = body == null ? 0 : body.Length;
var stringBuilder = new StringBuilder(uri.OriginalString.Length + (headers.Count * 20) + body.Length);
var stringBuilder = new StringBuilder(uri.OriginalString.Length + (headers.Count * 20) + bodyLenght);
stringBuilder.Append($"curl -X {httpMethod.Method} \"{uri.OriginalString}\"");

foreach (var item in headers)
Expand Down
10 changes: 7 additions & 3 deletions Tiny.RestClient/Tiny.RestClient.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.1;netstandard1.2;netstandard1.3;netstandard2.0;net45;net46;net47;</TargetFrameworks>
<Version>1.5.3</Version>
<Version>1.5.5</Version>
<Copyright>Copyright © Jérôme Giacomini 2018</Copyright>
<NeutralLanguage>en</NeutralLanguage>
<Title>Tiny.RestClient</Title>
Expand Down Expand Up @@ -37,7 +37,10 @@
<RepositoryUrl>https://github.com/jgiacomini/Tiny.RestClient.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<MinClientVersion>3.0.3</MinClientVersion>
<PackageReleaseNotes>See release notes at https://github.com/jgiacomini/Tiny.RestClient/blob/1.5.3/RELEASE-NOTES.md</PackageReleaseNotes>
<PackageReleaseNotes>See release notes at https://github.com/jgiacomini/Tiny.RestClient/blob/1.5.5/RELEASE-NOTES.md</PackageReleaseNotes>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<PropertyGroup>
<LangVersion>latest</LangVersion>
Expand All @@ -47,8 +50,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All"/>
</ItemGroup>

<!--NET Standard 1.1-->
<ItemGroup Condition=" $(TargetFramework) =='netstandard1.1' ">
<PackageReference Include="System.Xml.XmlSerializer" Version=" 4.3.0" />
Expand Down

0 comments on commit 934060e

Please sign in to comment.