Question

Trying to use a guid as a resource id in a rest url but cant find any resource on how to. My best right now (not working though) is: http://localhost:49157/PhotogalleryDS.svc/gallery('1d03beb3-6d63-498b-aad7-fab0b1480996') (I've tried duouble/single quotes. And also {guid....} with braces. Still no luck.

i only get: Syntax error '"' at position 0.

Question is: How would I (with regard to specification) write the url for a resource where the id is a guid?

Was it helpful?

Solution

I figured it out!

http://localhost:49157/PhotogalleryDS.svc/photo(guid'01231cc7-1e26-4f33-9fdf-fdf7015267dd')

This is the way

OTHER TIPS

My best guess based on what you've written is that you're wrapping that URL in double quotes. The position 0 in that error message probably refers to the character directly before http

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top