Skip to content

Instantly share code, notes, and snippets.

@bcmiller
Created July 22, 2010 20:14
Show Gist options
  • Save bcmiller/486523 to your computer and use it in GitHub Desktop.
Save bcmiller/486523 to your computer and use it in GitHub Desktop.
connecting to http://localhost/api/rest/node/112004
inputs
array(3) {
["body"]=>
string(4) "junk"
["title"]=>
string(10) "Contact Us"
["path"]=>
string(10) "contact-us"
}
+++++
response output from contact us:::::::::::::
string(6) "112004"
----------------------------------
127.0.0.1 - - [22/Jul/2010:15:11:01 -0500] "PUT /api/rest/node/112004 HTTP/1.1" 200 8 "-" "PEAR HTTP_Request class ( http://pear.php.net/ )"
got this back:
112004
before and after sql on the node table:
mysql> select * from node where title='contact us';
+--------+--------+----------+----------+------------+-----+--------+------------+------------+---------+---------+----------+--------+------+-----------+
| nid | vid | type | language | title | uid | status | created | changed | comment | promote | moderate | sticky | tnid | translate |
+--------+--------+----------+----------+------------+-----+--------+------------+------------+---------+---------+----------+--------+------+-----------+
| 112004 | 122051 | apcipage | en | Contact Us | 1 | 1 | 1279719089 | 1279829462 | 0 | 0 | 0 | 0 | 0 | 0 |
+--------+--------+----------+----------+------------+-----+--------+------------+------------+---------+---------+----------+--------+------+-----------+
1 row in set (0.00 sec)
mysql> select * from node where title='contact us';
+--------+--------+----------+----------+------------+-----+--------+------------+------------+---------+---------+----------+--------+------+-----------+
| nid | vid | type | language | title | uid | status | created | changed | comment | promote | moderate | sticky | tnid | translate |
+--------+--------+----------+----------+------------+-----+--------+------------+------------+---------+---------+----------+--------+------+-----------+
| 112004 | 122051 | apcipage | en | Contact Us | 1 | 1 | 1279719089 | 1279829646 | 0 | 0 | 0 | 0 | 0 | 0 |
+--------+--------+----------+----------+------------+-----+--------+------------+------------+---------+---------+----------+--------+------+-----------+
1 row in set (0.00 sec)
mysql>
array(9) {
["title"]=>
string(10) "Contact Us"
["body"]=>
string(271) "<div id="instructions-wrapper">
<ul>
<li>AllPlayers.com Customer Support, 600 E. Las Colinas Blvd., Suite 1525 Irving, Texas 75039 </li>
<li>Email: <a href="mailto:[email protected]">[email protected]</a></li>
</ul>
</div>"
["path"]=>
string(10) "contact-us"
["type"]=>
string(8) "apcipage"
["promote"]=>
string(1) "0"
["comment"]=>
string(1) "0"
["format"]=>
string(1) "2"
["revision_uid"]=>
string(1) "1"
["revision_timestamp"]=>
string(10) "1279829748"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment