Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 727071e

Browse files
committed
Add UriKind.Relative
1 parent ae7d8da commit 727071e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

guides/voice/gather-dtmf-tones-guide/gather-example-step-0/example.5.x.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public TwiMLResult Index()
1818
response.Gather(numDigits: 1)
1919
.Say("For sales, press 1. For support, press 2.");
2020
// If the user doesn't enter input, loop
21-
response.Redirect(new Uri("/voice"));
21+
response.Redirect(new Uri("/voice", UriKind.Relative));
2222

2323
return TwiML(response);
2424
}

guides/voice/gather-dtmf-tones-guide/gather-example-step-1/example.5.x.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ private static void RenderMainMenu(VoiceResponse response)
4545
.Say("For sales, press 1. For support, press 2.");
4646

4747
// If the user doesn't enter input, loop
48-
response.Redirect(new Uri("/voice"));
48+
response.Redirect(new Uri("/voice", UriKind.Relative));
4949
}
5050
}

guides/voice/gather-dtmf-tones-guide/gather-example-step-2.1/example.5.x.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ public TwiMLResult Gather(VoiceRequest request)
2828
break;
2929
default:
3030
response.Say("Sorry, I don't understand that choice.").Pause();
31-
response.Redirect(new Uri("/voice"));
31+
response.Redirect(new Uri("/voice", UriKind.Relative));
3232
break;
3333
}
3434
}
3535
else
3636
{
3737
// If no input was sent, redirect to the /voice route
38-
response.Redirect(new Uri("/voice"));
38+
response.Redirect(new Uri("/voice", UriKind.Relative));
3939
}
4040

4141
return TwiML(response);

guides/voice/gather-dtmf-tones-guide/gather-example-step-2/example.5.x.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ public class VoiceController : TwilioController
1313
public TwiMLResult Index()
1414
{
1515
var response = new VoiceResponse();
16-
response.Gather(numDigits: 1, action: new Uri("/voice/gather"))
16+
response.Gather(numDigits: 1, action: new Uri("/voice/gather", UriKind.Relative))
1717
.Say("For sales, press 1. For support, press 2.");
1818

1919
// If the user doesn't enter input, loop
20-
response.Redirect(new Uri("/voice"));
20+
response.Redirect(new Uri("/voice", UriKind.Relative));
2121

2222
return TwiML(response);
2323
}
@@ -41,14 +41,14 @@ public TwiMLResult Gather(VoiceRequest request)
4141
break;
4242
default:
4343
response.Say("Sorry, I don't understand that choice.").Pause();
44-
response.Redirect(new Uri("/voice"));
44+
response.Redirect(new Uri("/voice", UriKind.Relative));
4545
break;
4646
}
4747
}
4848
else
4949
{
5050
// If no input was sent, redirect to the /voice route
51-
response.Redirect(new Uri("/voice"));
51+
response.Redirect(new Uri("/voice", UriKind.Relative));
5252
}
5353

5454
return TwiML(response);

0 commit comments

Comments
 (0)