-
Notifications
You must be signed in to change notification settings - Fork 647
Add .http file to ApiService in starter template #9973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new HTTP request template for the ApiService project in the starter template, enabling quick manual testing of the default weather forecast endpoint.
- Introduces a
.http
file with a configurable host address and a GET request for/weatherforecast
. - Provides a template variable for the service host that can be adjusted locally.
Comments suppressed due to low confidence (1)
src/Aspire.ProjectTemplates/templates/aspire-starter/9.4/Aspire-StarterApplication.1.ApiService/Aspire-StarterApplication.1.ApiService.http:1
- [nitpick] Consider adding a brief comment at the top of this .http file explaining its purpose and how to run it (e.g., using the VS Code REST Client extension) so that users unfamiliar with .http files can quickly get started.
@Aspire_StarterApplication.1.ApiService_HostAddress = http://localhost:5301
@@ -0,0 +1,6 @@ | |||
@ApiService_HostAddress = http://localhost:5301 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be missing something, but shouldn't this be the https one? So port 7301?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this matches what the API template does, and it's because if the app is launched with the "http" launch profile, there won't be an HTTPS port, only HTTP. The HTTP port is consistent between both the "http" and "https" launch profiles so we use it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment but looks good otherwise.
* Add .http file to ApiService in starter template Fixes #9592 * Simplify variable name
Description
Adds a .http file to the ApiService project in the starter template.
Fixes #9592
Checklist