File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
uri-helper-get-encoded-path-and-query
uri-helper-get-encoded-url Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2323 ` UriHelper.BuildAbsolute ` combines the given URI components into a string that is properly encoded for use in HTTP headers. This sample
2424 shows 9 ways on how to use it.
2525
26- dotnet6
26+ dotnet8
Original file line number Diff line number Diff line change 44
55app . Run ( context =>
66{
7- context . Response . Headers . Add ( "Content-Type" , "text/html" ) ;
7+ context . Response . Headers . Append ( "Content-Type" , "text/html" ) ;
88
99 var requestUrl = context . Request . GetEncodedPathAndQuery ( ) ;
1010 return context . Response . WriteAsync ( $@ "<html>
Original file line number Diff line number Diff line change 44
55app . Run ( context =>
66{
7- context . Response . Headers . Add ( "Content-Type" , "text/html" ) ;
7+ context . Response . Headers . Append ( "Content-Type" , "text/html" ) ;
88 return context . Response . WriteAsync ( $@ "<html>
99<body>
1010 <h1>Get Encoded Url</h1>
You can’t perform that action at this time.
0 commit comments