diff --git a/src/interest.cpp b/src/interest.cpp
index b81ea6f..fe8faf3 100644
--- a/src/interest.cpp
+++ b/src/interest.cpp
@@ -100,6 +100,47 @@
   interestStruct.interestLifetimeMilliseconds = interestLifetimeMilliseconds_;
   nonce_.get(interestStruct.nonce);
 }
+
+string 
+Interest::toUri() const
+{
+  ostringstream selectors;
+
+  if (minSuffixComponents_ >= 0)
+    selectors << "&ndn.MinSuffixComponents=" << minSuffixComponents_;
+  if (maxSuffixComponents_ >= 0)
+    selectors << "&ndn.MaxSuffixComponents=" << maxSuffixComponents_;
+  if (childSelector_ >= 0)
+    selectors << "&ndn.ChildSelector=" << childSelector_;
+  if (answerOriginKind_ >= 0)
+    selectors << "&ndn.AnswerOriginKind=" << answerOriginKind_;
+  if (scope_ >= 0)
+    selectors << "&ndn.Scope=" << scope_;
+  if (interestLifetimeMilliseconds_ >= 0)
+    selectors << "&ndn.InterestLifetime=" << interestLifetimeMilliseconds_;
+  if (publisherPublicKeyDigest_.getPublisherPublicKeyDigest().size() > 0) {
+    selectors << "&ndn.PublisherPublicKeyDigest=";
+    Name::toEscapedString(*publisherPublicKeyDigest_.getPublisherPublicKeyDigest(), selectors);
+  }
+  if (nonce_.size() > 0) {
+    selectors << "&ndn.Nonce=";
+    Name::toEscapedString(*nonce_, selectors);
+  }
+  if (exclude_.size() > 0)
+    selectors << "&ndn.Exclude=" << exclude_.toUri();
+
+  ostringstream result;
+
+  result << name_.toUri();
+  string selectorsString(selectors.str());
+  if (selectorsString.size() > 0) {
+    // Replace the first & with ?.
+    result << "?";
+    result.write(&selectorsString[1], selectorsString.size() - 1);
+  }
   
+  return result.str();  
+}
+
 }
 
