Skip to content

A sample webchat application in ASP.NET Core with SignalR and Angular

License

Notifications You must be signed in to change notification settings

wetryio/aspnetcore-signalr-angular-devdays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aspnetcore-signalr-angular-devdays

A sample webchat application in ASP.NET Core with SignalR and Angular

Controller

Account Controller

Connect new user

POST /api/v1/account

Body Params :

    public IActionResult Post([FromBody] string username)

Response Success :

200 : User connected, return a json token
    {
        "access_token": "..."
    }

Response Error :

400 : Username is empty or validation failed
409 : User with this username already exist
    {
        "errorCode": 1,
        "message": "..."
    }

Get list of connected users

GET /api/v1/account

    public IActionResult Get()

Response Success :

200 : User connected
    {
        "users": [
            {
                "id": "00000000-0000-0000-0000-000000000000",
                "username": "..."
            }
        ]
    }

Response Error :

401 : Unauthorized, please connect first and use access token
    {
        "errorCode": 1,
        "message": "..."
    }

Hub

Chat Hub

About

A sample webchat application in ASP.NET Core with SignalR and Angular

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published