Skip to content
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

Remove postman #323

Merged
merged 4 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Odata-docs/webapi/first-odata-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ Returning `System.Linq.IQueryable` or `ActionResult<IQueryable>` enables **OData

## Query resources using OData

Post some data to the web API app, using a tool such as [HTTP REPL](/aspnet/core/web-api/http-repl) or [Postman](https://www.postman.com/product/tools).

Post some data to the web API app, using a tool such as [HTTP REPL](/aspnet/core/web-api/http-repl) or [curl](https://curl.haxx.se/).
Send 5 Post requests to `https://localhost:5001/api/todo` with the 5 items below **separately** in the request body.

```json
Expand Down
16 changes: 4 additions & 12 deletions Odata-docs/webapi/odata-expand.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,9 @@ The preceding code enables OData queries and returns enrollment entities `School

OData `expand` functionality can be used to query related data. For example, to get the *Course* data for each *Enrollment* entity, include `?$expand=course` at the end of the request path:

This tutorial uses Postman to test the web API.

* Install [Postman](https://www.getpostman.com/apps)
* Start the web app.
* Start Postman.
* Disable **SSL certificate verification**

* From **File > Settings** (**General* tab), disable **SSL certificate verification**.
> [!WARNING]
> Re-enable SSL certificate verification after testing the controller.
Use a tool such as [HTTP REPL](/aspnet/core/web-api/http-repl) or [HTTP REPL](/aspnet/core/web-api/http-repl) or [curl](https://curl.haxx.se/) to test the web API:

* Start the web app. and the endpoint testing tool.
* Create a new request.
* Set the HTTP method to `GET`.
* Set the request URL to `https://localhost:5001/api/Enrollment/?$expand=course($expand=Department)`. Change the port as necessary.
Expand Down Expand Up @@ -114,9 +106,9 @@ Replace the `EnableQuery` attribute with `MyEnableQuery` attribute in the `Enrol

[!code-csharp[](odata-advanced/sample/odata-expand/Controllers/EnrollmentController.cs?name=snippet_MyEnableQuery)]

In Postman:
In the endpoint testing tool:

* Send the previous `Get` request `https://localhost:5001/api/Enrollment/?$expand=course($expand=Department)`. The request returns data because `($expand=Department)` is not prohibited.
* Send a `Get` request for with `($expand=CourseAssignments)`. For example, `https://localhost:5001/api/Enrollment/?$expand=course($expand=CourseAssignments)`

The preceding query returns `400 Bad Request`.
The preceding query returns `400 Bad Request`.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Microsoft Open Source Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.