File tree Expand file tree Collapse file tree 8 files changed +8
-8
lines changed Expand file tree Collapse file tree 8 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 32
32
33
33
This custom redirection logic allows us to simply specify the image file names without worrying about their exact path e.g.'xx.jpg' and 'yy.png'.
34
34
35
- dotnet6
35
+ dotnet8
Original file line number Diff line number Diff line change 9
9
10
10
app . MapGet ( "/" , ( context ) =>
11
11
{
12
- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
12
+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
13
13
return context . Response . WriteAsync ( $@ "<html><body>
14
14
Always display this page when path ends with / e.g. <a href=""/hello-world/"">/hello-world/</a> or
15
15
<a href=""/welcome/everybody/inthis/train/"">/welcome/everybody/inthis/train/</a>.</body></html>" ) ;
Original file line number Diff line number Diff line change 8
8
9
9
app . MapGet ( "" , ( context ) =>
10
10
{
11
- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
11
+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
12
12
var path = context . Request . Query [ "Path" ] ;
13
13
var ext = context . Request . Query [ "Ext" ] ;
14
14
return context . Response . WriteAsync ( $@ "<html><body>Always display this page when path ends with an extension (e.g. .html or .aspx) and capture the their values.
Original file line number Diff line number Diff line change 9
9
10
10
app . MapGet ( "/" , ( context ) =>
11
11
{
12
- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
12
+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
13
13
var path = context . Request . Query [ "Path" ] ;
14
14
var ext = context . Request . Query [ "Ext" ] ;
15
15
return context . Response . WriteAsync ( $@ "
Original file line number Diff line number Diff line change 9
9
10
10
app . MapGet ( "" , ( context ) =>
11
11
{
12
- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
12
+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
13
13
var path = context . Request . Query [ "Path" ] ;
14
14
var ext = context . Request . Query [ "Ext" ] ;
15
15
return context . Response . WriteAsync ( $@ "<html><body>
Original file line number Diff line number Diff line change 13
13
14
14
app . MapGet ( "" , async context =>
15
15
{
16
- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
16
+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
17
17
18
18
await context . Response . WriteAsync ( $ "<h1>Extension Based Redirection</h1><img src=\" ryan-wong-25025.jpg\" /> <br/> <img src=\" Acorn_PNG744.png\" />") ;
19
19
} ) ;
Original file line number Diff line number Diff line change 29
29
30
30
app . MapGet ( "" , async context =>
31
31
{
32
- context . Response . Headers . Add ( "content-type" , "text/html" ) ;
32
+ context . Response . Headers . Append ( "content-type" , "text/html" ) ;
33
33
34
34
await context . Response . WriteAsync ( $ "<h1>Extension Based Redirection</h1><img src=\" ryan-wong-25025.jpg\" />") ;
35
35
} ) ;
Original file line number Diff line number Diff line change 14
14
15
15
RSS reader demo using ``` Microsoft.ServiceModel.Syndication ``` .
16
16
17
- dotnet6
17
+ dotnet8
You can’t perform that action at this time.
0 commit comments