[PR #62] [MERGED] Add the Host, Protocol, Port and Origin to the Request message so they can be used in templating #752

Closed
opened 2025-12-29 15:33:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/wiremock/WireMock.Net/pull/62
Author: @alastairtree
Created: 11/17/2017
Status: Merged
Merged: 11/18/2017
Merged by: @StefH

Base: masterHead: feat/add-origin-host-port-and-protocol-to-request-templating


📝 Commits (3)

  • df744fd feat: Add the Host, Protocol Port and Origin to the Request message
  • 0382e4e source code file reformat
  • cb056cb appveyor

📊 Changes

3 files changed (+189 additions, -146 deletions)

View changed files

📝 appveyor.yml (+1 -1)
📝 src/WireMock.Net/RequestMessage.cs (+169 -145)
📝 test/WireMock.Net.Tests/ResponseTests.Handlebars.cs (+19 -0)

📄 Description

Hi

I needed to be able to template responses based on more granular information than was already available in the request object so have added some calculated fields and supporting test. Would you be interested in accepting it back?

  • Add new fields for Host, Origin, protocol and Port during request message creation, derived from the Uri object
  • Allow the new fields to be accessed in the templating engine
  • Add tests for the new fields

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/wiremock/WireMock.Net/pull/62 **Author:** [@alastairtree](https://github.com/alastairtree) **Created:** 11/17/2017 **Status:** ✅ Merged **Merged:** 11/18/2017 **Merged by:** [@StefH](https://github.com/StefH) **Base:** `master` ← **Head:** `feat/add-origin-host-port-and-protocol-to-request-templating` --- ### 📝 Commits (3) - [`df744fd`](https://github.com/wiremock/WireMock.Net/commit/df744fdabc2bfba20b61f2a0ce50b7d63a86da5b) feat: Add the Host, Protocol Port and Origin to the Request message - [`0382e4e`](https://github.com/wiremock/WireMock.Net/commit/0382e4ee4cf05ea849acffbda81075c7ab82b6ee) source code file reformat - [`cb056cb`](https://github.com/wiremock/WireMock.Net/commit/cb056cb0b3091702b22110978aaf1d3d51fda926) appveyor ### 📊 Changes **3 files changed** (+189 additions, -146 deletions) <details> <summary>View changed files</summary> 📝 `appveyor.yml` (+1 -1) 📝 `src/WireMock.Net/RequestMessage.cs` (+169 -145) 📝 `test/WireMock.Net.Tests/ResponseTests.Handlebars.cs` (+19 -0) </details> ### 📄 Description Hi I needed to be able to template responses based on more granular information than was already available in the request object so have added some calculated fields and supporting test. Would you be interested in accepting it back? - Add new fields for Host, Origin, protocol and Port during request message creation, derived from the Uri object - Allow the new fields to be accessed in the templating engine - Add tests for the new fields --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 15:33:02 +01:00
adam closed this issue 2025-12-29 15:33:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#752