diff --git a/ViaCEP.Tests/AddressTests.cs b/ViaCEP.Tests/AddressTests.cs
index 9410df9..6e3b2f4 100644
--- a/ViaCEP.Tests/AddressTests.cs
+++ b/ViaCEP.Tests/AddressTests.cs
@@ -19,8 +19,8 @@ public void ValidateSearchByFullAddress()
Assert.NotNull(result);
var list = result.ToList();
Assert.True(list.Any());
- Assert.True(list.Any(r => r.ZipCode.Equals("01310-905", StringComparison.CurrentCultureIgnoreCase)));
- Assert.True(list.Any(r => r.ZipCode.Equals("01310-923", StringComparison.CurrentCultureIgnoreCase)));
+ Assert.Contains(list, r => r.ZipCode.Equals("01310-905", StringComparison.InvariantCultureIgnoreCase));
+ Assert.Contains(list, r => r.ZipCode.Equals("01310-923", StringComparison.InvariantCultureIgnoreCase));
var first = list.First();
Assert.Equal("SP", first.StateInitials);
Assert.Equal("São Paulo", first.City);
diff --git a/ViaCEP/ViaCEPClient.cs b/ViaCEP/ViaCEPClient.cs
index 7e778b7..2674929 100644
--- a/ViaCEP/ViaCEPClient.cs
+++ b/ViaCEP/ViaCEPClient.cs
@@ -16,7 +16,7 @@ public static class ViaCEPClient
///
/// The base URL
///
- private const String BaseUrl = "https://viacep.com.br/ws/";
+ private const String BaseUrl = "https://viacep.com.br";
#endregion
@@ -44,7 +44,7 @@ public static async Task SearchAsync(String zipCode, CancellationT
using (var client = new HttpClient())
{
client.BaseAddress = new Uri(BaseUrl);
- var response = await client.GetAsync($"{zipCode}/json", token).ConfigureAwait(false);
+ var response = await client.GetAsync($"/ws/{zipCode}/json", token).ConfigureAwait(false);
response.EnsureSuccessStatusCode();
return await response.Content.ReadAsAsync(token).ConfigureAwait(false);
}
@@ -79,7 +79,7 @@ public static async Task> SearchAsync(
using (var client = new HttpClient())
{
client.BaseAddress = new Uri(BaseUrl);
- var response = await client.GetAsync($"{stateInitials}/{city}/{address}/json", token).ConfigureAwait(false);
+ var response = await client.GetAsync($"/ws/{stateInitials}/{city}/{address}/json", token).ConfigureAwait(false);
response.EnsureSuccessStatusCode();
return await response.Content.ReadAsAsync>(token).ConfigureAwait(false);
}