Click here to Skip to main content
15,499,571 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Simple Question on Http Verbs Pin
Richard Deeming1-Sep-20 8:13
mveRichard Deeming1-Sep-20 8:13 
AnswerRe: Simple Question on Http Verbs Pin
F-ES Sitecore1-Sep-20 1:41
professionalF-ES Sitecore1-Sep-20 1:41 
GeneralRe: Simple Question on Http Verbs Pin
Kevin Marois1-Sep-20 6:59
professionalKevin Marois1-Sep-20 6:59 
GeneralRe: Simple Question on Http Verbs Pin
F-ES Sitecore1-Sep-20 7:35
professionalF-ES Sitecore1-Sep-20 7:35 
GeneralRe: Simple Question on Http Verbs Pin
Kevin Marois1-Sep-20 8:10
professionalKevin Marois1-Sep-20 8:10 
GeneralRe: Simple Question on Http Verbs Pin
F-ES Sitecore1-Sep-20 8:25
professionalF-ES Sitecore1-Sep-20 8:25 
GeneralRe: Simple Question on Http Verbs Pin
Kevin Marois1-Sep-20 11:23
professionalKevin Marois1-Sep-20 11:23 
GeneralRe: Simple Question on Http Verbs Pin
F-ES Sitecore1-Sep-20 11:33
professionalF-ES Sitecore1-Sep-20 11:33 
Kevin Marois wrote:
The word 'delete' doesn't even exist in the method. What's stopping me from calling it?

If you put a non-delete verb attribute on it then the framework will stop you calling it, it will return a 404. .net has two ways of associating methods with verbs, one is the explicit adding of the attributes which will restrict what can route to that action. It also follows a naming convention so you can put the verb at the start of the action name, so GetProduct, DeleteProduct etc and .net will use that to route your calls to the right method by matching the verb with the action prefix. You can choose to follow neither convention and use bespoke names and no verb attributes and the routing will (I assume) work on the action name only.

So the purpose they serve is that if you want to following proper semantic api conventions where you route your calls to actions based on the verb then the HttpXXX attributes allow you to implement that convention if you don't want to use the names themselves to route your methods.
GeneralRe: Simple Question on Http Verbs Pin
Kevin Marois1-Sep-20 12:09
professionalKevin Marois1-Sep-20 12:09 
GeneralRe: Simple Question on Http Verbs Pin
F-ES Sitecore2-Sep-20 1:37
professionalF-ES Sitecore2-Sep-20 1:37 
GeneralRe: Simple Question on Http Verbs Pin
DerekT-P1-Sep-20 12:12
professionalDerekT-P1-Sep-20 12:12 
GeneralRe: Simple Question on Http Verbs Pin
F-ES Sitecore2-Sep-20 1:34
professionalF-ES Sitecore2-Sep-20 1:34 
GeneralRe: Simple Question on Http Verbs Pin
DerekT-P2-Sep-20 4:03
professionalDerekT-P2-Sep-20 4:03 
GeneralRe: Simple Question on Http Verbs Pin
F-ES Sitecore2-Sep-20 4:13
professionalF-ES Sitecore2-Sep-20 4:13 
GeneralRe: Simple Question on Http Verbs Pin
F-ES Sitecore2-Sep-20 4:12
professionalF-ES Sitecore2-Sep-20 4:12 
GeneralRe: Simple Question on Http Verbs Pin
Kevin Marois2-Sep-20 7:15
professionalKevin Marois2-Sep-20 7:15 
QuestionImage validation Pin
Member 1492048222-Aug-20 10:01
MemberMember 1492048222-Aug-20 10:01 
QuestionHi, can someone please help me with a task that I am struggling with. Pin
Member 1490081928-Jul-20 2:35
MemberMember 1490081928-Jul-20 2:35 
AnswerRe: Hi, can someone please help me with a task that I am struggling with. Pin
W Balboos, GHB1-Aug-20 12:05
mveW Balboos, GHB1-Aug-20 12:05 
GeneralRe: Hi, can someone please help me with a task that I am struggling with. Pin
Sarbjit Grewal3-Sep-20 19:32
professionalSarbjit Grewal3-Sep-20 19:32 
GeneralRe: Hi, can someone please help me with a task that I am struggling with. Pin
Mycroft Holmes4-Sep-20 13:20
professionalMycroft Holmes4-Sep-20 13:20 
AnswerRe: Hi, can someone please help me with a task that I am struggling with. Pin
Richard MacCutchan1-Aug-20 21:59
mveRichard MacCutchan1-Aug-20 21:59 
QuestionCan i use mailto for this? Pin
kingu39921-Jul-20 6:15
Memberkingu39921-Jul-20 6:15 
AnswerRe: Can i use mailto for this? Pin
Afzaal Ahmad Zeeshan1-Sep-20 10:10
mveAfzaal Ahmad Zeeshan1-Sep-20 10:10 
QuestionHow can I submit with 1 button and 1 form with 2 actions? Pin
amitb221-Jul-20 0:06
Memberamitb221-Jul-20 0:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.