uri

Pack URI how to get contents of folder

I have the following directory structure (all files as resources): Project \Maps +map.xml ... +something.xml To get to every file I use following syntax: "pack://application:,,,/Maps/map.xml" My question is - how to get contents of pack://application:,,,/Maps/ as FileInfo [] or List. ...

Can't store Data URI to database without stripping + characters

I am trying to grab a reference to images with src's in URI scheme. An example would be the images on google.com/news. if I alert(escape(saveObj.image)); I get something like below: data%3Aimage/jpeg%3Bbase64%2C/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQ...

What happened to URIUtil.encodePath from commons-httpclient-3.1?

I want to do what's described in question 724043, namely encode the path components of a URI. The class recommended to do that is URIUtil from Commons HttpClient 3.1. Unfortunately, that class seems to have disappeared from the most recent version of HttpClient. A similarly named class from HttpClient 4.1, URIUtils, doesn't provide the s...

What to use for space in REST URI?

What should I use: /findby/name/{first}_{last} /findby/name/{first}-{last} /findby/name/{first};{last} /findby/name/first/{first}/last/{last} etc. The URI represents a Person resource with 1 name, but I need to logically separate the first from the last to identify each. I kind of like the last example because I can do: /findby/n...

contacts quey with name and picture URI.

Hi i couldn't find a single query that would give me in API 2.0 of the contacts API the URI of the contact's image and the display name. For now as far as i know i can create a uri by having the contact's _ID , but i didn't see any row name that i can use in the projection of Data or Contact to get all that i need. can anyone help ? ...

Easy way to parse a url in C++ cross platform?

I need to parse a url to get the protocol host path and query in an application I am writing in c++. The application is intended to be cross platform. Im surprised I cant find anything that does this in boost or poco libraries. Is it somewhere obvious Im not looking? Any suggestions on appropriate open source libs? Or is this something I...

Relative Uri works for BitmapImage, but not for MediaPlayer?

This will be simple for you guys: var uri = new Uri("pack://application:,,,/LiftExperiment;component/pics/outside/elevator.jpg"); imageBitmap = new BitmapImage(); imageBitmap.BeginInit(); imageBitmap.UriSource = uri; imageBitmap.EndInit(); image.Source = imageBitmap; => Works perfectly on a .jpg with Build Action: Content Copy to Out...

How do I prevent the GET method from encoding HTML special characters in the URI?

I have a form using the GET method. If values are submitted with special characters, they appear in the URI as: ?value=fudge%20and%20stuff How do I make it clean? I don't want to use the header function because this is happening within a page in drupal. ...

How does vimeo route it's urls?

I'm wondering how vimeo manages to retain its parameters using routing, for example in vimeo, a search uri looks like this: http://vimeo.com/videos/search:google/, which will return a variable in this case google. This is easy enough to do, can simply use routes and explodes in php to get the data you require into a useful array, what ...

Changing URI suffix in Joomla when adding child php pages

I have added a new directory in my joomla website: http://sitedomain.tld/xxx/ then I have added index.php in that directory here is the code define( '_JEXEC', 1 ); define('JPATH_BASE', '..' ); define( 'DS', DIRECTORY_SEPARATOR ); require_once ( '../includes/defines.php' ); require_once ( '../includes/framework.php' ); //JD...

Detect the URI encoding automatically in Tomcat

I have an instance of Apache Tomcat 6.x running, and I want it to interpret the character set of incoming URLs a little more intelligent than the default behavior. In particular, I want to achieve the following mapping: So%DFe => Soße So%C3%9Fe => Soße So%DF%C3%9F => (error) The bevavior I want could be described as "try to decode the...

how to get the 'uri' from request object in django..

is there request.uri ??? thanks ...

Why does the WCF 3.5 REST Starter Kit do this?

I am setting up a REST endpoint that looks like the following: [WebInvoke(Method = "POST", UriTemplate = "?format=json", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)] and [WebInvoke(Method = "DELETE", UriTemplate = "?token={token}&format=json", ResponseFormat = WebMessageFormat.Json)] The ...

Should a given URI in a RESTful architecture always return the same response?

This is kind of a follow-up question to this one. So is having a unique response for any given URI a core tenant of RESTful architecture? A lot of discussion here tends that direction, but I haven't seen it anywhere as a "hard and fast" rule. I understand the value of it (for caching, crawling, passing links, etc), but I also see thin...

Is is bad practice to put a period in a URI path?

I am designing a REST API for a web application. I want to clearly version the API so that the interface can be changed in future without breaking existing services. So in my v1.0 API I want to clearly identify it as the v1.0 API, leaving me the freedom to release a future v1.1 version with breaking changes. My question is, would a peri...

List of Endpoints or URIs for a WCF client test-drive

I am aware of the Amazon.com exposed URIs ... which I need to sign up for and then on I can utilize them ....... roll-up my sleeves ..... and get some WCF Client test-drive coding. What are the other such publicly exposed end points that reflect real or almost real-time services? Any offerings specifically from Microsoft? I am bas...

php URI troube with if statement,

I am running an if statement, that looks like this, if($this->uri->segment(1) !== 'search' || $this->uri->segment(1) !== 'employment') { //dome something } My problem is that first condition works, if the uri segment 1 equals search then the method do not run however if I on the page employment, and the first segment of the uri i...

Is it possible to retrieve an uri chunk on AppEngine?

Let's say i go to myblog.com/post/12. The /post handler is already defined, but how can i get the parameter being passed? 12 in this case is the post_id. I'm using the Python SDK. ...

What do I gain by filtering URLs through Perl's URI module?

Do I gain something when I transform my $url like this: $url = URI->new( $url )? #!/usr/bin/env perl use warnings; use strict; use 5.012; use URI; use XML::LibXML; my $url = 'http://stackoverflow.com/'; $url = URI->new( $url ); my $doc = XML::LibXML->load_html( location => $url, recover => 2 ); my @nodes = $doc->getElementsByTagName( ...

Turning a string into a Uri... (Android)

I have a string, 'songchoice' I want it to become a 'Uri' so I can use with MediaPlayer.create(context, Uri) Can someone help me to convert songchoice to the Uri? Thanks, James ...