24
loading...
This website collects cookies to deliver better user experience
injectClientPrincipalCookies
method and now we’re starting to get somewhere.StaticWebAppsAuthCookie
, which becomes the header that you unpack in the API to get the user info (or use my nifty JavaScript library).### Local
GET http://localhost:4280/api/get-message
Send Request
option above the request name it’ll give you back a response in a new tab:HTTP/1.1 200 OK
connection: close
date: Fri, 02 Jul 2021 05:42:49 GMT
content-type: text/plain; charset=utf-8
server: Kestrel
transfer-encoding: chunked
This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response. There is no logged in user
Cookie
header, and custom headers are added to a request as subsequent lines from the one containing the HTTP request:## Local
GET http://localhost:4280/api/get-message
Cookie: StaticWebAppsAuthCookie=<your cookie value here>
userDetail
value being [email protected]
, so the response is:HTTP/1.1 200 OK
connection: close
date: Fri, 02 Jul 2021 05:45:16 GMT
content-type: text/plain; charset=utf-8
server: Kestrel
transfer-encoding: chunked
This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response. The user is [email protected]