Skip to content

Commit

Permalink
Use string instead of Uri to hold request path
Browse files Browse the repository at this point in the history
See #1070
  • Loading branch information
sfmskywalker committed Jul 4, 2021
1 parent 3fbb1a2 commit a24b1ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class HttpEndpointMiddleware
var workflowBlueprintWrappers = (await Task.WhenAll(workflowBlueprints.Values.Select(async x => await workflowBlueprintReflector.ReflectAsync(serviceProvider, x, cancellationToken)))).ToDictionary(x => x.WorkflowBlueprint.Id);

var commonInputModel = new HttpRequestModel(
new Uri(request.Path.ToString(), UriKind.Relative),
request.Path.ToString(),
request.Method,
request.Query.ToDictionary(x => x.Key, x => x.Value.ToString()),
request.Headers.ToDictionary(x => x.Key, x => x.Value.ToString())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;

namespace Elsa.Activities.Http.Models
{
public record HttpRequestModel(Uri Path, string Method, IDictionary<string, string> QueryString, IDictionary<string, string> Headers, object? Body = default)
public record HttpRequestModel(string Path, string Method, IDictionary<string, string> QueryString, IDictionary<string, string> Headers, object? Body = default)
{
public T GetBody<T>() => (T) Body!;
}
Expand Down

0 comments on commit a24b1ac

Please sign in to comment.