<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,6 +14,7 @@ module Database.CouchDB
   , Doc
   , Rev
   , doc
+  , rev
   , isDocString
   , newNamedDoc
   , newDoc
@@ -21,6 +22,7 @@ module Database.CouchDB
   , deleteDoc
   , forceDeleteDoc
   , getDocPrim
+  , getDocRaw
   , getDoc
   , getAndUpdateDoc
   , getAllDocIds
@@ -113,6 +115,10 @@ instance Read Doc where
       | otherwise =
           (&quot;&quot;,ch:rest)
 
+-- |Returns a Rev
+rev :: String -&gt; Rev
+rev = Rev . toJSString          
+
 -- |Returns a safe document name.  Signals an error if the name is
 -- invalid.
 doc :: String -&gt; Doc
@@ -202,6 +208,9 @@ getDocPrim db doc = do
     Nothing -&gt; return Nothing
     Just (_,rev,obj) -&gt; return $ Just (doc,Rev rev,obj)
 
+getDocRaw :: DB -&gt; Doc -&gt; CouchMonad (Maybe String)
+getDocRaw db doc =  U.getDocRaw (show db) (show doc)
+
 getAndUpdateDoc :: (JSON a)
                 =&gt; DB -- ^database
                 -&gt; Doc -- ^document name</diff>
      <filename>src/Database/CouchDB.hs</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@ module Database.CouchDB.Unsafe
   , deleteDoc
   , forceDeleteDoc
   , getDocPrim
+  , getDocRaw
   , getDoc
   , getAndUpdateDoc
   , getAllDocIds
@@ -39,6 +40,7 @@ couchResponse respBody = case decode respBody of
   Error s -&gt; error s
   Ok r -&gt; fromJSObject r
 
+request' :: String -&gt; RequestMethod -&gt; CouchMonad (Response String)
 request' path method = request path [] method [] &quot;&quot;
 
 -- |Creates a new database.  Throws an exception if the database already
@@ -176,6 +178,19 @@ getDocPrim db doc = do
     (4,0,4) -&gt; return Nothing -- doc does not exist
     code -&gt; fail $ &quot;getDocPrim: &quot; ++ show code ++ &quot; error&quot;
 
+-- |Gets a document as a Maybe String.  Returns the raw result of what 
+-- couchdb returns.  Returns Nothing if the doc does not exist.
+getDocRaw :: String -&gt; String -&gt; CouchMonad (Maybe String)
+getDocRaw db doc = do
+  r &lt;- request' (db ++ &quot;/&quot; ++ doc) GET
+  case rspCode r of
+    (2,0,0) -&gt; do
+      return $ Just (rspBody r)
+    (4,0,4) -&gt; return Nothing -- doc does not exist
+    code -&gt; fail $ &quot;getDocRaw: &quot; ++ show code ++ &quot; error&quot;
+
+
+
 getAndUpdateDoc :: (JSON a)
                 =&gt; String -- ^database
                 -&gt; String -- ^document name</diff>
      <filename>src/Database/CouchDB/Unsafe.hs</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>171217e0567c02edb32539331ea2f25b9f3acb7e</id>
    </parent>
  </parents>
  <author>
    <name>Arjun Guha</name>
    <email>arjun@cs.brown.edu</email>
  </author>
  <url>http://github.com/arjunguha/haskell-couchdb/commit/bdc40c3fcb64b5806f4f12bb1b5e4117633b15f5</url>
  <id>bdc40c3fcb64b5806f4f12bb1b5e4117633b15f5</id>
  <committed-date>2009-06-21T15:29:02-07:00</committed-date>
  <authored-date>2009-06-21T15:29:02-07:00</authored-date>
  <message>Henry\'s getDocRaw</message>
  <tree>6a70801304d8aa9133d3f34a17f7bad7fe38567a</tree>
  <committer>
    <name>Arjun Guha</name>
    <email>arjun@cs.brown.edu</email>
  </committer>
</commit>
