Get user profile
curl -X GET "http://localhost:3000/api/auth/profile"fetch("http://localhost:3000/api/auth/profile")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:3000/api/auth/profile"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "http://localhost:3000/api/auth/profile"
response = requests.request("GET", url)
print(response.text){
"user": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"username": "string",
"email": "user@example.com",
"firstName": "string",
"lastName": "string",
"roles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"permissions": {}
}
],
"isActive": true,
"createdAt": "2019-08-24T14:15:22Z"
}
}