diff --git a/AzureSearchEmulator.IntegrationTests/DashboardIntegrationTests.cs b/AzureSearchEmulator.IntegrationTests/DashboardIntegrationTests.cs
index 0af895f..8b9192a 100644
--- a/AzureSearchEmulator.IntegrationTests/DashboardIntegrationTests.cs
+++ b/AzureSearchEmulator.IntegrationTests/DashboardIntegrationTests.cs
@@ -38,6 +38,27 @@ public async Task Root_ServesTheDashboard()
Assert.Contains("Running normally", html);
}
+ ///
+ /// The search page renders only once its circuit connects (issue #92), so the static response
+ /// carries the layout rather than results; what this guards is the route existing alongside the
+ /// API's own routes and the navigation reaching it.
+ ///
+ [Fact]
+ public async Task Search_ServesThePage()
+ {
+ await factory.WaitUntilServingAsync();
+ using var client = factory.CreateHttpClient();
+
+ var response = await client.GetAsync("/search", TestContext.Current.CancellationToken);
+
+ Assert.Equal(HttpStatusCode.OK, response.StatusCode);
+ Assert.Equal("text/html", response.Content.Headers.ContentType?.MediaType);
+
+ var html = await response.Content.ReadAsStringAsync(TestContext.Current.CancellationToken);
+
+ Assert.Contains("href=\"search\" class=\"topnav-link active\"", html);
+ }
+
[Fact]
public async Task Dashboard_StylesheetIsServed()
{
@@ -50,6 +71,23 @@ public async Task Dashboard_StylesheetIsServed()
Assert.Equal("text/css", response.Content.Headers.ContentType?.MediaType);
}
+ ///
+ /// Without Blazor's script the pages still prerender, so the dashboard looks fine, but nothing
+ /// interactive ever starts and the search page, which is not prerendered, stays blank. The
+ /// script comes from a package the SDK can leave out of a publish while dotnet run keeps
+ /// working, so it is checked here against the built image (issue #92).
+ ///
+ [Fact]
+ public async Task Dashboard_BlazorScriptIsServed()
+ {
+ await factory.WaitUntilServingAsync();
+ using var client = factory.CreateHttpClient();
+
+ var response = await client.GetAsync("/_framework/blazor.web.js", TestContext.Current.CancellationToken);
+
+ Assert.Equal(HttpStatusCode.OK, response.StatusCode);
+ }
+
///
/// The container has a writable indexes volume and no malformed definitions, so a healthy
/// answer here is the real thing rather than a check that cannot fail — the unit tests cover
diff --git a/AzureSearchEmulator.IntegrationTests/EmulatorIntegrationTests.cs b/AzureSearchEmulator.IntegrationTests/EmulatorIntegrationTests.cs
index 3241f37..3240143 100644
--- a/AzureSearchEmulator.IntegrationTests/EmulatorIntegrationTests.cs
+++ b/AzureSearchEmulator.IntegrationTests/EmulatorIntegrationTests.cs
@@ -37,6 +37,34 @@ public async Task CreateIndex_ShouldSucceed()
await indexClient.DeleteIndexAsync(indexName, TestContext.Current.CancellationToken);
}
+ ///
+ /// The SDK lists names with $select=name, which the listing endpoint used to throw on
+ /// (found while building the dashboard's search page, issue #92).
+ ///
+ [Fact]
+ public async Task GetIndexNames_ShouldListCreatedIndex()
+ {
+ const string indexName = "test-get-index-names";
+ var indexClient = factory.CreateSearchIndexClient();
+ await CreateIndexAsync(indexClient, indexName);
+
+ try
+ {
+ var names = new List();
+
+ await foreach (var name in indexClient.GetIndexNamesAsync(TestContext.Current.CancellationToken))
+ {
+ names.Add(name);
+ }
+
+ Assert.Contains(indexName, names);
+ }
+ finally
+ {
+ await indexClient.DeleteIndexAsync(indexName, TestContext.Current.CancellationToken);
+ }
+ }
+
[Fact]
public async Task UploadDocuments_ShouldSucceed()
{
diff --git a/AzureSearchEmulator.UnitTests/SearchPageTests.cs b/AzureSearchEmulator.UnitTests/SearchPageTests.cs
new file mode 100644
index 0000000..a2fe985
--- /dev/null
+++ b/AzureSearchEmulator.UnitTests/SearchPageTests.cs
@@ -0,0 +1,157 @@
+using Azure.Search.Documents.Models;
+using AzureSearchEmulator.Dashboard;
+using Xunit;
+
+namespace AzureSearchEmulator.UnitTests;
+
+///
+/// Tests for the pieces behind the dashboard's search page (issue #92) that do not need a running
+/// emulator: how its inputs become SDK options, how it reaches itself, and how it renders JSON and
+/// highlights.
+///
+public class SearchPageTests
+{
+ [Theory]
+ [InlineData(new[] { "http://localhost:5123" }, "http://localhost:5123/")]
+ [InlineData(new[] { "https://+:8443" }, "https://localhost:8443/")]
+ [InlineData(new[] { "http://*:80" }, "http://localhost/")]
+ [InlineData(new[] { "http://0.0.0.0:8080" }, "http://127.0.0.1:8080/")]
+ [InlineData(new[] { "http://[::]:8080" }, "http://localhost:8080/")]
+ [InlineData(new[] { "https://localhost:5001", "http://localhost:5000" }, "http://localhost:5000/")]
+ public void LoopbackEndpoint_ConnectsToABinding(string[] addresses, string expected)
+ {
+ Assert.Equal(new Uri(expected), LoopbackEndpoint.Resolve(addresses));
+ }
+
+ [Fact]
+ public void LoopbackEndpoint_WithNoUsableBinding_IsNull()
+ {
+ Assert.Null(LoopbackEndpoint.Resolve([]));
+ Assert.Null(LoopbackEndpoint.Resolve(["unix:/tmp/emulator.sock"]));
+ }
+
+ [Fact]
+ public void SplitList_KeepsCommasInsideFunctionsAndQuotes()
+ {
+ var items = SearchQueryForm.SplitList("geo.distance(location, geography'POINT(-122 47)') asc, rating desc,, name ");
+
+ Assert.Equal(["geo.distance(location, geography'POINT(-122 47)') asc", "rating desc", "name"], items);
+ }
+
+ [Fact]
+ public void SplitFacets_KeepsParametersWithTheirField()
+ {
+ var facets = SearchQueryForm.SplitFacets("category, rating,interval:1, tags,count:5,sort:value");
+
+ Assert.Equal(["category", "rating,interval:1", "tags,count:5,sort:value"], facets);
+ }
+
+ [Fact]
+ public void ToSearchOptions_OmitsBlankInputs()
+ {
+ var options = new SearchQueryForm { Filter = " " }.ToSearchOptions();
+
+ Assert.Null(options.Filter);
+ Assert.Null(options.Skip);
+ Assert.Null(options.SemanticSearch);
+ Assert.Empty(options.OrderBy);
+ Assert.Empty(options.Facets);
+ Assert.Equal(SearchQueryForm.DefaultTop, options.Size);
+ Assert.True(options.IncludeTotalCount);
+ }
+
+ [Fact]
+ public void ToSearchOptions_CarriesEveryInput()
+ {
+ var form = new SearchQueryForm
+ {
+ QueryType = "semantic",
+ SearchMode = "all",
+ Filter = "rating ge 4",
+ OrderBy = "rating desc, name",
+ Select = "id, name",
+ SearchFields = "name",
+ Facets = "category",
+ Highlight = "description",
+ ScoringProfile = "boost",
+ SemanticConfiguration = "default",
+ Top = 5,
+ Skip = 10,
+ IncludeTotalCount = false
+ };
+
+ var options = form.ToSearchOptions();
+
+ Assert.Equal(SearchQueryType.Semantic, options.QueryType);
+ Assert.Equal(SearchMode.All, options.SearchMode);
+ Assert.Equal("rating ge 4", options.Filter);
+ Assert.Equal(["rating desc", "name"], options.OrderBy);
+ Assert.Equal(["id", "name"], options.Select);
+ Assert.Equal(["name"], options.SearchFields);
+ Assert.Equal(["category"], options.Facets);
+ Assert.Equal(["description"], options.HighlightFields);
+ Assert.Equal("boost", options.ScoringProfile);
+ Assert.Equal("default", options.SemanticSearch.SemanticConfigurationName);
+ Assert.Equal(5, options.Size);
+ Assert.Equal(10, options.Skip);
+ Assert.False(options.IncludeTotalCount);
+ }
+
+ [Fact]
+ public void JsonHighlighter_ClassifiesTokens()
+ {
+ var tokens = JsonHighlighter.Tokenize("""{"name": "Fancy \"Inn\"", "rating": -4.5e1, "open": true, "tags": null}""");
+
+ Assert.Contains(new JsonToken(JsonTokenKind.Key, "\"name\""), tokens);
+ Assert.Contains(new JsonToken(JsonTokenKind.String, "\"Fancy \\\"Inn\\\"\""), tokens);
+ Assert.Contains(new JsonToken(JsonTokenKind.Number, "-4.5e1"), tokens);
+ Assert.Contains(new JsonToken(JsonTokenKind.Boolean, "true"), tokens);
+ Assert.Contains(new JsonToken(JsonTokenKind.Null, "null"), tokens);
+ Assert.Contains(new JsonToken(JsonTokenKind.Punctuation, "{"), tokens);
+ }
+
+ [Theory]
+ [InlineData("""{"a": [1, 2, {"b": "c"}]}""")]
+ [InlineData("""{"unterminated": "oops""")]
+ [InlineData("not json at all")]
+ public void JsonHighlighter_TokensReproduceTheInput(string json)
+ {
+ var tokens = JsonHighlighter.Tokenize(json);
+
+ Assert.Equal(json, string.Concat(tokens.Select(i => i.Text)));
+ }
+
+ [Fact]
+ public void JsonHighlighter_Format_IndentsWithoutEscapingMarkup()
+ {
+ var formatted = JsonHighlighter.Format("""{"text":"a b"}""");
+
+ Assert.Equal("{\n \"text\": \"a b\"\n}", formatted.ReplaceLineEndings("\n"));
+ }
+
+ [Fact]
+ public void JsonHighlighter_Format_LeavesInvalidJsonAlone()
+ {
+ Assert.Equal("oops", JsonHighlighter.Format("oops"));
+ }
+
+ [Fact]
+ public void HighlightMarkup_EncodesDocumentTextButKeepsEmphasis()
+ {
+ var markup = HighlightMarkup.Render(" the hotel & spa");
+
+ Assert.Equal("<script>x</script> the hotel & spa", markup.Value);
+ }
+
+ [Fact]
+ public void DocumentValueFormatter_SummarisesVectors()
+ {
+ var vector = Enumerable.Range(0, 1536).Select(i => (object)(double)i).ToArray();
+
+ Assert.Equal("[1536 numbers]", DocumentValueFormatter.Format(vector));
+ Assert.Equal("[1,2,3]", DocumentValueFormatter.Format(new object[] { 1, 2, 3 }));
+ Assert.Equal("[\"a\",\"b\"]", DocumentValueFormatter.Format(new object[] { "a", "b" }));
+ Assert.Equal("4.5", DocumentValueFormatter.Format(4.5));
+ Assert.Equal("null", DocumentValueFormatter.Format(null));
+ }
+}
diff --git a/AzureSearchEmulator/AzureSearchEmulator.csproj b/AzureSearchEmulator/AzureSearchEmulator.csproj
index 68425df..1c11d6a 100644
--- a/AzureSearchEmulator/AzureSearchEmulator.csproj
+++ b/AzureSearchEmulator/AzureSearchEmulator.csproj
@@ -21,9 +21,15 @@
Paul Irwinlogo.pngREADME.md
+
+ true
+
diff --git a/AzureSearchEmulator/Components/Layout/MainLayout.razor b/AzureSearchEmulator/Components/Layout/MainLayout.razor
index 9bfc2f1..fb90392 100644
--- a/AzureSearchEmulator/Components/Layout/MainLayout.razor
+++ b/AzureSearchEmulator/Components/Layout/MainLayout.razor
@@ -15,6 +15,10 @@
Local development service
+
diff --git a/AzureSearchEmulator/Components/Pages/Search.razor b/AzureSearchEmulator/Components/Pages/Search.razor
new file mode 100644
index 0000000..24eee9f
--- /dev/null
+++ b/AzureSearchEmulator/Components/Pages/Search.razor
@@ -0,0 +1,631 @@
+@page "/search"
+@using System.Text.Json
+@using Azure
+@using Azure.Search.Documents.Models
+@using AzureSearchEmulator.Dashboard
+@using SdkSearchIndex = Azure.Search.Documents.Indexes.Models.SearchIndex
+@using SdkSearchField = Azure.Search.Documents.Indexes.Models.SearchField
+@using SdkFieldType = Azure.Search.Documents.Indexes.Models.SearchFieldDataType
+@* Not prerendered: every load queries the emulator through the SDK, and prerendering would run each
+ of those twice — once for the static pass and again when the circuit takes over. *@
+@rendermode @(new InteractiveServerRenderMode(prerender: false))
+@inject EmulatorClientFactory Clients
+@inject NavigationManager Navigation
+
+Search · Azure Search Emulator
+
+
Search an index
+
+@if (_loadError is not null)
+{
+
+
Could not list indexes
+
@_loadError
+
+}
+else if (_indexNames is null)
+{
+
+
+
Loading indexes…
+
+}
+else if (_indexNames.Count == 0)
+{
+
+
No indexes yet
+
+ Create an index through the REST API or an Azure SDK client pointed at this emulator, and
+ it will be listed here to search.
+
+
+}
+else
+{
+
+
+ @if (_exchange is not null || _error is not null)
+ {
+
+
+
+ @if (_exchange is not null)
+ {
+
+
+ }
+
+
+
+ @switch (_tab)
+ {
+ case ResultsTab.Request when _exchange is not null:
+
+ break;
+ case ResultsTab.Response when _exchange is not null:
+
+ break;
+ default:
+ @RenderResults()
+ break;
+ }
+
+
+ }
+}
+
+@code {
+ private enum ResultsTab
+ {
+ Results,
+ Request,
+ Response
+ }
+
+ /// What the page needs to know about the selected index to offer its options.
+ private sealed record IndexDetails(
+ string Name,
+ string? KeyField,
+ string? TitleField,
+ IReadOnlyList ScoringProfiles,
+ IReadOnlyList SemanticConfigurations);
+
+ private sealed record ResultsView(
+ long? TotalCount,
+ IReadOnlyList> Items,
+ IDictionary> Facets,
+ IReadOnlyList Answers,
+ int Skip);
+
+ [SupplyParameterFromQuery(Name = "index")]
+ public string? IndexQuery { get; set; }
+
+ [SupplyParameterFromQuery(Name = "q")]
+ public string? SearchQuery { get; set; }
+
+ private readonly SearchQueryForm _form = new();
+
+ private IReadOnlyList? _indexNames;
+ private string? _loadError;
+ private string? _indexName;
+ private IndexDetails? _index;
+
+ private bool _searching;
+ private ResultsView? _results;
+ private string? _error;
+ private HttpExchange? _exchange;
+ private ResultsTab _tab;
+
+ protected override async Task OnInitializedAsync()
+ {
+ try
+ {
+ var names = new List();
+
+ await foreach (var name in Clients.CreateIndexClient().GetIndexNamesAsync())
+ {
+ names.Add(name);
+ }
+
+ names.Sort(StringComparer.OrdinalIgnoreCase);
+ _indexNames = names;
+ }
+ catch (Exception ex) when (ex is RequestFailedException or HttpRequestException or InvalidOperationException)
+ {
+ _loadError = ex.Message;
+ return;
+ }
+
+ if (_indexNames.Count == 0)
+ {
+ return;
+ }
+
+ _form.SearchText = SearchQuery ?? "";
+
+ var initial = _indexNames.FirstOrDefault(i => string.Equals(i, IndexQuery, StringComparison.OrdinalIgnoreCase))
+ ?? _indexNames[0];
+
+ await SelectIndexAsync(initial);
+ }
+
+ private async Task IndexChangedAsync(ChangeEventArgs e)
+ {
+ if (e.Value is string name && name != _indexName)
+ {
+ await SelectIndexAsync(name);
+ }
+ }
+
+ ///
+ /// Switches to an index and searches it straight away, so choosing an index shows what is in it
+ /// without a second click.
+ ///
+ private async Task SelectIndexAsync(string name)
+ {
+ _indexName = name;
+ _index = null;
+ _results = null;
+ _exchange = null;
+ _error = null;
+
+ try
+ {
+ var response = await Clients.CreateIndexClient().GetIndexAsync(name);
+ _index = Describe(response.Value);
+ }
+ catch (RequestFailedException ex)
+ {
+ _error = ex.Message;
+ return;
+ }
+
+ // Options naming things on the previous index would fail against this one.
+ _form.ScoringProfile = "";
+ _form.SemanticConfiguration = _index.SemanticConfigurations.FirstOrDefault() ?? "";
+
+ if (_form.IsSemantic && _index.SemanticConfigurations.Count == 0)
+ {
+ _form.QueryType = "simple";
+ }
+
+ _form.Skip = 0;
+ await RunSearchAsync();
+ }
+
+ private async Task SubmitAsync()
+ {
+ _form.Skip = 0;
+ await RunSearchAsync();
+ }
+
+ private async Task PageAsync(int direction)
+ {
+ _form.Skip = Math.Max(0, _form.Skip + direction * Math.Max(1, _form.Top));
+ await RunSearchAsync();
+ }
+
+ private async Task RunSearchAsync()
+ {
+ if (_indexName is null || _searching)
+ {
+ return;
+ }
+
+ _searching = true;
+ _error = null;
+
+ var recorder = new HttpExchangeRecorder();
+ var client = Clients.CreateSearchClient(_indexName, recorder);
+ var searchText = string.IsNullOrWhiteSpace(_form.SearchText) ? "*" : _form.SearchText;
+
+ try
+ {
+ var response = await client.SearchAsync(searchText, _form.ToSearchOptions());
+ var results = response.Value;
+
+ // Only the first page, which arrived with the response. Enumerating further would have
+ // the SDK follow continuation links with requests of its own, and the page shows one
+ // request at a time.
+ IReadOnlyList> items = [];
+
+ await foreach (var page in results.GetResultsAsync().AsPages())
+ {
+ items = page.Values;
+ break;
+ }
+
+ _results = new ResultsView(
+ results.TotalCount,
+ items,
+ results.Facets ?? new Dictionary>(),
+ results.SemanticSearch?.Answers ?? [],
+ _form.Skip);
+
+ UpdateAddress();
+ }
+ catch (RequestFailedException ex)
+ {
+ _results = null;
+ _error = ErrorMessage(recorder.LastExchange) ?? ex.Message;
+ }
+ catch (HttpRequestException ex)
+ {
+ _results = null;
+ _error = ex.Message;
+ }
+ finally
+ {
+ _exchange = recorder.LastExchange;
+ _searching = false;
+ }
+ }
+
+ ///
+ /// Keeps the index and query in the address bar, so a reload or a copied link comes back to the
+ /// same search.
+ ///
+ private void UpdateAddress()
+ {
+ var address = Navigation.GetUriWithQueryParameters(new Dictionary
+ {
+ ["index"] = _indexName,
+ ["q"] = string.IsNullOrWhiteSpace(_form.SearchText) ? null : _form.SearchText
+ });
+
+ if (address != Navigation.Uri)
+ {
+ Navigation.NavigateTo(address, replace: true);
+ }
+ }
+
+ ///
+ /// The message from the emulator's error envelope. The SDK's own exception message appends the
+ /// status, headers and raw content, all of which the Response tab already shows properly.
+ ///
+ private static string? ErrorMessage(HttpExchange? exchange)
+ {
+ if (exchange?.Response?.Body is not { Length: > 0 } body)
+ {
+ return null;
+ }
+
+ try
+ {
+ using var document = JsonDocument.Parse(body);
+
+ return document.RootElement.TryGetProperty("error", out var error)
+ && error.TryGetProperty("message", out var message)
+ && message.ValueKind == JsonValueKind.String
+ ? message.GetString()
+ : null;
+ }
+ catch (JsonException)
+ {
+ return null;
+ }
+ }
+
+ private static IndexDetails Describe(SdkSearchIndex index)
+ {
+ var key = index.Fields.FirstOrDefault(i => i.IsKey == true)?.Name;
+ var semanticTitle = index.SemanticSearch?.Configurations.FirstOrDefault()?.PrioritizedFields?.TitleField?.FieldName;
+
+ return new IndexDetails(
+ index.Name,
+ key,
+ semanticTitle ?? FindTitleField(index.Fields, key),
+ index.ScoringProfiles.Select(i => i.Name).ToList(),
+ index.SemanticSearch?.Configurations.Select(i => i.Name).ToList() ?? []);
+ }
+
+ ///
+ /// A string field that looks like a title or name, to head each result card with when no semantic
+ /// configuration names one. Without either, the card is headed with the document key.
+ ///
+ private static string? FindTitleField(IList fields, string? key)
+ {
+ var candidates = fields
+ .Where(i => i.Type == SdkFieldType.String && i.Name != key && i.IsHidden != true)
+ .Select(i => i.Name)
+ .ToList();
+
+ return candidates.FirstOrDefault(i => i.Contains("title", StringComparison.OrdinalIgnoreCase))
+ ?? candidates.FirstOrDefault(i => i.Contains("name", StringComparison.OrdinalIgnoreCase));
+ }
+
+ private RenderFragment RenderResults() => __builder =>
+ {
+ if (_error is not null)
+ {
+
+
The query failed
+
@_error
+ @if (_exchange?.Response is not null)
+ {
+
The Response tab has the full error the emulator returned.
+ }
+
+ return;
+ }
+
+ if (_results is null)
+ {
+ return;
+ }
+
+ var results = _results;
+ var first = results.Skip + 1;
+ var last = results.Skip + results.Items.Count;
+
+
+ @if (results.Items.Count == 0)
+ {
+ No documents matched.
+ }
+ else
+ {
+ Showing @first–@last
+ @if (results.TotalCount is { } total)
+ {
+ of @total.ToString("N0")
+ }
+ }
+ @if (_exchange is not null)
+ {
+ · @_exchange.Duration.TotalMilliseconds.ToString("0") ms
+ }
+
+
+ @foreach (var answer in results.Answers)
+ {
+
+ @foreach (var (field, fragments) in highlights)
+ {
+
@field
+ @foreach (var fragment in fragments)
+ {
+
@HighlightMarkup.Render(fragment)
+ }
+ }
+
+ }
+
+
+ @foreach (var (name, value) in document)
+ {
+ // Both are already in the card's heading.
+ if ((name == _index?.TitleField && title is not null) || (name == _index?.KeyField && key is not null))
+ {
+ continue;
+ }
+
+
@name
+
@DocumentValueFormatter.Format(value)
+ }
+
+
+ };
+
+ private bool HasNextPage(ResultsView results) =>
+ results.TotalCount is { } total
+ ? results.Skip + results.Items.Count < total
+ : results.Items.Count > 0 && results.Items.Count == _form.Top;
+
+ ///
+ /// Range buckets are open at the ends: the first has no lower bound and the last no upper one.
+ ///
+ private static string FacetLabel(FacetResult facet) => facet switch
+ {
+ { Value: { } value } => DocumentValueFormatter.Format(value),
+ { From: null, To: { } to } => $"< {DocumentValueFormatter.Format(to)}",
+ { From: { } from, To: null } => $"≥ {DocumentValueFormatter.Format(from)}",
+ _ => $"{DocumentValueFormatter.Format(facet.From)} – {DocumentValueFormatter.Format(facet.To)}"
+ };
+}
diff --git a/AzureSearchEmulator/Components/Shared/Headers.razor b/AzureSearchEmulator/Components/Shared/Headers.razor
new file mode 100644
index 0000000..a9c1840
--- /dev/null
+++ b/AzureSearchEmulator/Components/Shared/Headers.razor
@@ -0,0 +1,17 @@
+@* Collapsed by default: the body is what a reader is usually after, and the SDK sends enough
+ headers to push it below the fold. *@
+
+ Headers (@Items.Count)
+
+ @foreach (var (name, value) in Items)
+ {
+
@name
+
@value
+ }
+
+
+
+@code {
+ [Parameter, EditorRequired]
+ public IReadOnlyList> Items { get; set; } = [];
+}
diff --git a/AzureSearchEmulator/Components/Shared/HttpExchangeView.razor b/AzureSearchEmulator/Components/Shared/HttpExchangeView.razor
new file mode 100644
index 0000000..c0d0d99
--- /dev/null
+++ b/AzureSearchEmulator/Components/Shared/HttpExchangeView.razor
@@ -0,0 +1,50 @@
+@using AzureSearchEmulator.Dashboard
+
+@* One side of a recorded SDK round trip, laid out as the HTTP message it was (issue #92). *@
+@if (ShowResponse)
+{
+ @if (Exchange.Response is { } response)
+ {
+