Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Commit

Permalink
don't add data for the GET example
Browse files Browse the repository at this point in the history
  • Loading branch information
toddtreece committed Apr 16, 2014
1 parent 2e369e6 commit 9c7a69c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
12 changes: 4 additions & 8 deletions Phant/examples/SparkFun/sparkfun.ino
Expand Up @@ -15,18 +15,11 @@ void loop() {
phant.add("val2", 22);
phant.add("val3", 0.1234);

Serial.println("----URL-----");
Serial.println("----TEST URL-----");
Serial.println(phant.url());

Serial.println();

phant.add("val1", "get");
phant.add("val2", true);
phant.add("val3", 0x65);

Serial.println("----HTTP GET----");
Serial.println(phant.get());

phant.add("val1", "post");
phant.add("val2", false);
phant.add("val3", 98.6);
Expand All @@ -36,6 +29,9 @@ void loop() {

Serial.println();

Serial.println("----HTTP GET----");
Serial.println(phant.get());

delay(2000);

}
Expand Down
20 changes: 8 additions & 12 deletions README.md
Expand Up @@ -82,13 +82,6 @@ void loop() {

Serial.println();

phant.add("val1", "get");
phant.add("val2", true);
phant.add("val3", 0x65);

Serial.println("----HTTP GET----");
Serial.println(phant.get());

phant.add("val1", "post");
phant.add("val2", false);
phant.add("val3", 98.6);
Expand All @@ -98,6 +91,9 @@ void loop() {

Serial.println();

Serial.println("----HTTP GET----");
Serial.println(phant.get());

delay(2000);

}
Expand All @@ -111,11 +107,6 @@ This example prints the following to the serial monitor:
----TEST URL-----
http://data.sparkfun.com/input/VGb2Y1jD4VIxjX3x196z.txt?private_key=9YBaDk6yeMtNErDNq4YM&val1=url&val2=22&val3=0.1234

----HTTP GET----
GET /output/VGb2Y1jD4VIxjX3x196z.csv HTTP/1.1
Host: data.sparkfun.com
Connection: close

----HTTP POST----
POST /input/VGb2Y1jD4VIxjX3x196z.txt HTTP/1.1
Host: data.sparkfun.com
Expand All @@ -124,4 +115,9 @@ Content-Type: application/x-www-form-urlencoded
Content-Length: 29

val1=post&val2=0&val3=98.6000

----HTTP GET----
GET /output/VGb2Y1jD4VIxjX3x196z.csv HTTP/1.1
Host: data.sparkfun.com
Connection: close
```

0 comments on commit 9c7a69c

Please sign in to comment.