In the previous part of this series, we looked at creating our first API. But how do you determine which API is being invoked? This is accomplished with routing.
If you have a Products class your entry (end point) might look like this:
[Function(nameof(Products))]
public IActionResult Run(HttpTrigger(AuthorizationLevel.Anonymous,
"get", Route="products/{category}/{id: int}")]
HttpRequest req, string category, int id)
{
return new OkObjectResult(new {category, id});
}
Notice the routing property (“products/{category}/{id: int}” — this allows us to customize and restrict the arguments from the desired endpoint. The customer/user can now use the same endpoint for a variety of situations.
You can go further and restrict the type of the parameters, and even provide default values:
Route="products/{category:alpha}/{id: int?}")]
Here we are saying that the category must consist only of standard characters, and the id is optional.
Next up: Options
Note, this material is based on our book Programming APIs with C# and .NET from Packt by Jesse Liberty and Joseph Deluzen.






































viagra canadian pharmacy: indian pharmacies safe – bitcoin pharmacy online
can you buy antibiotics over the counter Antibiotics Pharmacology cheapest antibiotics
https://antimicrobialresearch.com/bactrim.html OTC antibiotics
Over the counter antibiotics for infection OTC antibiotics п»їbuy antibiotics
It?s exhausting to find educated folks on this topic, however you sound like you realize what you?re talking about! Thanks
https://antimicrobialresearch.com/doxycycline.html Azithromycin Dihydrate
buy antibiotics for uti OTC antibiotics buy doxycycline antibiotics
online antibiotics Institute for Antimicrobial Research prescription antibiotic
can you buy antibiotics over the counter Institute for Antimicrobial Research best online doctor for antibiotics
uti antibiotics online IARP otc uti medicine
https://antimicrobialresearch.com/bactrim.html Doxycycline Hyclate
http://primelinepharmacy.com/# edmeds
https://pharmacologicalsciences.com/cialis.html Pharmacological Sciences Research Institute
https://pharmacologicalsciences.com/ Pharmacological Sciences
https://novamenpharmacy.com/# NovaMen Pharmacy
https://pharmacologicalsciences.com/ levitra
viagra Pharmacological Institute Pharmacological Institute
buy ed medication online Pharmacological Sciences best online ed pills
https://pharmacologicalsciences.com/cialis.html kamagra
http://novamenpharmacy.com/# NovaMen Pharmacy
jojobet güncel giriş: jojobet
http://novamenpharmacy.com/# NovaMen Pharmacy
https://jojovip.top/# jojobet
jojobet güncel adres jojobet
https://corevitalpharmacy.shop/# Buy Tadalafil 10mg
https://novamenpharmacy.com/# Cheap generic Viagra online
CoreVital Pharmacy: Cialis over the counter – CoreVital Pharmacy
http://corevitalpharmacy.com/# CoreVital Pharmacy
where can i get ed pills: ed pills pharmacy – online prescription for ed
buy ed pills online: online ed pharmacy – erectile dysfunction drugs online
https://novamenpharmacy.com/# Viagra online price
https://medicobridgerx.com/# mexican pharmacies near me
indian pharmacy online: TrustRx India – indianpharmacy com
http://medbridgepharmacy.com/# indian pharmacy
http://medicobridgerx.com/# MedicoBridge RX
medicine from mexico: MedicoBridge RX – MedicoBridge RX
Hey! I could have sworn I’ve been to this website before but after checking through some of the post I realized it’s new to me. Nonetheless, I’m definitely glad I found it and I’ll be bookmarking and checking back often!
http://happypawspharmacy.com/# pet pharmacy USA
True Health Pharm: True Health Pharm – cheapest online ed meds
True Health Pharm: True Health Pharm – True Health Pharm
mostbet casino: mostbet
mostbet kasyno: mostbet
https://mostbetvipaz.buzz/# mostbet casino
mostbet güncel adres: mostbet
https://cassiteleri.top/# casino deneme siteleri
**aqua sculpt**
AquaSculpt is a high-quality metabolic support supplement created to help the body utilize fat more efficiently while maintaining steady, reliable energy levels throughout the day.
Hi my friend! I want to say that this article is awesome, nice written and include approximately all vital infos. I?d like to see more posts like this.
The way Jesse breaks down routing in Azure Functions really helps clarify how flexible and powerful endpoint design can be. I especially appreciate the example showing how to enforce parameter types and make IDs optional — it’s a small detail that makes a big difference in API robustness. This is exactly the kind of practical guidance that makes API development less error-prone and more maintainable.
Thanks , I have just been looking for info about this subject for ages and yours is the best I’ve discovered till now. But, what about the bottom line? Are you sure about the source?
Usually I don’t read post on blogs, however I would like to say that this write-up very forced me to take a look at and do so! Your writing taste has been surprised me. Thanks, quite great article.