-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.txt
16 lines (8 loc) · 3.47 KB
/
curl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// get all phones
curl -i -X GET http://localhost:3000/phones/
// get one phone with id
curl -i -X GET http://localhost:3000/phones/5069b47aa892630aae000007
// Save new phone
curl -i -X POST -H "Content-Type: application/json" -d "{ ""additionalFeatures"" : ""Gorilla Glass display, Dedicated Camera Key, Ring Silence Switch, Swype keyboard."", ""android"" : { ""os"" : ""Android 2.2"", ""ui"" : ""Dell Stage"" }, ""availability"" : [""AT&T,"", ""KT,"", ""T-Mobile""], ""battery"" : { ""standbyTime"" : ""400 hours"", ""talkTime"" : ""7 hours"", ""type"" : ""Lithium Ion (Li-Ion) (1400 mAH)"" }, ""camera"" : { ""features"" : [""Flash"", ""Video""], ""primary"" : ""8.0 megapixels"" }, ""connectivity"" : { ""bluetooth"" : ""Bluetooth 2.1"", ""cell"" : ""850/1900/2100 3G; 850/900/1800/1900 GSM/GPRS/EDGE\n900/1700/2100 3G; 850/900/1800/1900 GSM/GPRS/EDGE"", ""gps"" : true, ""infrared"" : false, ""wifi"" : ""802.11 b/g/n"" }, ""description"" : ""blablablablb ..."", ""display"" : { ""screenResolution"" : ""WVGA (800 x 480)"", ""screenSize"" : ""4.1 inches"", ""touchScreen"" : true }, ""hardware"" : { ""accelerometer"" : true, ""audioJack"" : ""3.5mm"", ""cpu"" : ""1 Ghz processor"", ""fmRadio"" : false, ""physicalKeyboard"" : false, ""usb"" : ""USB 2.0"" }, ""images"" : [""img/phones/dell-venue.0.jpg"", ""img/phones/dell-venue.1.jpg"", ""img/phones/dell-venue.2.jpg"", ""img/phones/dell-venue.3.jpg"", ""img/phones/dell-venue.4.jpg"", ""img/phones/dell-venue.5.jpg""], ""name"" : ""Dell Venue Test"", ""sizeAndWeight"" : { ""dimensions"" : [""64.0 mm (w)"", ""121.0 mm (h)"", ""12.9 mm (d)""], ""weight"" : ""164.0 grams"" }, ""storage"" : { ""flash"" : ""1000MB"", ""ram"" : ""512MB"" }}" http://localhost:3000/phones
// Update existing phone
curl -i -X POST -H "Content-Type: application/json" -d "{ ""additionalFeatures"" : ""Gorilla Glass display, Dedicated Camera Key, Ring Silence Switch, Swype keyboard."", ""android"" : { ""os"" : ""Android 2.2"", ""ui"" : ""Dell Stage"" }, ""availability"" : [""AT&T,"", ""KT,"", ""T-Mobile""], ""battery"" : { ""standbyTime"" : ""400 hours"", ""talkTime"" : ""7 hours"", ""type"" : ""Lithium Ion (Li-Ion) (1400 mAH)"" }, ""camera"" : { ""features"" : [""Flash"", ""Video""], ""primary"" : ""8.0 megapixels"" }, ""connectivity"" : { ""bluetooth"" : ""Bluetooth 2.1"", ""cell"" : ""850/1900/2100 3G; 850/900/1800/1900 GSM/GPRS/EDGE\n900/1700/2100 3G; 850/900/1800/1900 GSM/GPRS/EDGE"", ""gps"" : true, ""infrared"" : false, ""wifi"" : ""802.11 b/g/n"" }, ""description"" : ""blublublublbublu ..."", ""display"" : { ""screenResolution"" : ""WVGA (800 x 480)"", ""screenSize"" : ""4.1 inches"", ""touchScreen"" : true }, ""hardware"" : { ""accelerometer"" : true, ""audioJack"" : ""3.5mm"", ""cpu"" : ""1 Ghz processor"", ""fmRadio"" : false, ""physicalKeyboard"" : false, ""usb"" : ""USB 2.0"" }, ""images"" : [""img/phones/dell-venue.0.jpg"", ""img/phones/dell-venue.1.jpg"", ""img/phones/dell-venue.2.jpg"", ""img/phones/dell-venue.3.jpg"", ""img/phones/dell-venue.4.jpg"", ""img/phones/dell-venue.5.jpg""], ""name"" : ""New One Mobile Phone !"", ""sizeAndWeight"" : { ""dimensions"" : [""64.0 mm (w)"", ""121.0 mm (h)"", ""12.9 mm (d)""], ""weight"" : ""164.0 grams"" }, ""storage"" : { ""flash"" : ""1000MB"", ""ram"" : ""512MB"" }, }" http://localhost:3000/phones/53022d8c13153e942b000015