Skip to content

Latest commit

 

History

History
52 lines (46 loc) · 728 Bytes

README.md

File metadata and controls

52 lines (46 loc) · 728 Bytes

.NET Core Vanilla Rest Client and Server

Usage

RestClient

Perform a GET Request.

dotnet run [url]

Example

# cd to RestClient folder
cd RestClient/

dotnet run https://jsonplaceholder.typicode.com/todos/1

Output

{
  "userId": 1,
  "id": 1,
  "title": "delectus aut autem",
  "completed": false
}

RestServer

Start the server at the specified port.

dotnet run [port]

Example

# cd to RestServer folder
cd RestServer/

dotnet run 5000

# Server is listening at port 5000.

Now you can perform a GET request to your server.

# RestClient
dotnet run http://localhost:5000

Output

{
  "id": 0,
  "userName": "Arnaldo"
}