Three way to form URI for REST Services

No.of Views1359
Bookmarked0 times
Downloads 
Votes0
By  Dhananjay Kumar   On  28 Jul 2010 10:07:36
Tag : WCF , REST Services
In this article, I will show how we could construct URI in three ways.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In this article, I will show how we could construct URI in three ways.

Method # 1: Creating URI from string

Image Loading

Output 

Image Loading

Method #2 New URI from Component Instance

I am here taking host and path individually and then combining them in constructor of Uri class. 

Image Loading

Output 

Image Loading

Method #3 Creating URI using Try Pattern validation

In this , I am showing you how could we use Try Pattern method of URI class to construct an URI. 

Image Loading

Output 

Image Loading

That's all enjoy the happy coding.

 
Sign Up to vote for this article
 
About Author
 
Dhananjay Kumar
Occupation-Software Engineer
Company-Infosys Technolgies,Pune
Member Type-Gold
Location-India
Joined date-20 Jul 2009
Home Page-http://dhananjaykumar.net/
Blog Page-http://dhananjaykumar.net/
Dhananjay Kumar is Microsoft MVP on connected system. He blogs at http://dhananjaykumar.net/ . You can follow him http://twitter.com/debugmode_/ and reach him at dhananjay.25july@gmail.com
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top