Skip to content

Commit 50280c5

Browse files
committed
fixing up for new release again
1 parent 16f4c8a commit 50280c5

File tree

3 files changed

+55
-12
lines changed

3 files changed

+55
-12
lines changed

resources/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Introduction
2+
------------
3+
4+
HTTP Requests for Processing is a small library that takes the pain out of doing HTTP requests in Processing.
5+
6+
HTTP Requests for Processing is based on code by [Chris Allick](http://chrisallick.com/) and [Daniel Shiffman](http://www.shiffman.net/).
7+
8+
9+
How to
10+
------------
11+
Install the library by [downloading the latest release](https://github.com/runemadsen/HTTProcessing/releases) or via the [Processing contribution manager](http://wiki.processing.org/w/How_to_Install_a_Contributed_Library).
12+
13+
Then import the library in your sketch:
14+
```Java
15+
import http.requests.*;
16+
```
17+
Then you can make GET and POST requests from your code:
18+
```Java
19+
GetRequest get = new GetRequest("http://httprocessing.heroku.com");
20+
get.send();
21+
println("Reponse Content: " + get.getContent());
22+
println("Reponse Content-Length Header: " + get.getHeader("Content-Length"));
23+
24+
PostRequest post = new PostRequest("http://httprocessing.heroku.com");
25+
post.addData("name", "Rune");
26+
post.send();
27+
println("Reponse Content: " + post.getContent());
28+
println("Reponse Content-Length Header: " + post.getHeader("Content-Length"));
29+
```
30+
To authenticate requests using a Basic Access authentication scheme, include the following in your requests:
31+
```Java
32+
get.addUser("username", "password");
33+
post.addUser("username", "password");
34+
```
35+
To add a header to your request, including the following:
36+
```Java
37+
//method: addHeader(name,value)
38+
get.addHeader("Accept", "application/json");
39+
post.addHeader("Content-Type", "application/json");
40+
```

resources/build.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sketchbook.location=${user.home}/Dropbox/Processing
3838
# Uncommenting the line below will overwrite the classpath.local.location from
3939
# above.
4040

41-
classpath.local.location=/Applications/Processing-3.0.1.app/Contents/Java/core/library
41+
classpath.local.location=/Applications/Processing-3.0.1.app/Contents/Java/core/library
4242

4343

4444
# Add all jar files that are required for compiling your project to the local
@@ -162,10 +162,10 @@ library.dependencies=?
162162
library.keywords=?
163163

164164
tested.platform=osx,windows
165-
tested.processingVersion=3.0b7
165+
tested.processingVersion=3.0.1
166166

167167

168168
# Include javadoc references into your project's javadocs.
169169

170-
javadoc.java.href=http://java.sun.com/javase/6/docs/api/
170+
javadoc.java.href=http://java.sun.com/javase/7/docs/api/
171171
javadoc.processing.href=http://processing.org/reference/javadoc/core/

resources/build.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<project name="ProcessingLibs" default="clean" basedir="../">
1+
<project name="Processing Library" default="clean" basedir="../">
22

33

44
<!--
@@ -52,8 +52,8 @@
5252
<property name="project.reference" location="reference"/>
5353
<property name="project.dist" location="distribution"/>
5454
<property name="project.dist.version" location="distribution/${project.name}-${library.version}"/>
55-
<property name="install.source" location="resources/install_instructions.txt"/>
56-
<property name="install.destination" location="${project.dist.version}/INSTALL.txt"/>
55+
<property name="install.source" location="resources/README.md"/>
56+
<property name="install.destination" location="${project.dist.version}/README.md"/>
5757
<property name="libprops.source" location="resources/library.properties"/>
5858

5959
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
@@ -78,7 +78,7 @@
7878

7979
<target name="init">
8080
<echo>${line}
81-
Building the Processing library ${project.name} ${library.version}
81+
Building the Processing Library ${project.name} ${library.version}
8282
${line}
8383
src path ${project.src}
8484
bin path ${project.bin}
@@ -209,8 +209,8 @@ ${line}
209209

210210

211211
<target name="generate.javadoc" if="is.normal">
212-
<!-- create the java reference of the library -->
213-
<javadoc bottom="Processing library ${project.name} by ${author.name}. ${library.copyright}"
212+
<!-- create the java reference of the Library -->
213+
<javadoc bottom="Processing Library ${project.name} by ${author.name}. ${library.copyright}"
214214
classpath="${classpath.local.location}/core.jar;{project.bin}"
215215
destdir="${project.tmp}/${project.name}/reference"
216216
verbose="false"
@@ -271,8 +271,11 @@ ${line}
271271
<replaceregexp file="${file}" match="##library.version##" replace="${library.version}" flags="g" />
272272
<replaceregexp file="${file}" match="##library.prettyVersion##" replace="${library.prettyVersion}" flags="g" />
273273

274+
<replaceregexp file="${file}" match="##compatible.minRevision##" replace="${compatible.minRevision}" flags="g" />
275+
<replaceregexp file="${file}" match="##compatible.maxRevision##" replace="${compatible.maxRevision}" flags="g" />
276+
274277
<replaceregexp file="${file}" match="##library.url##" replace="${library.url}" flags="g" />
275-
<replaceregexp file="${file}" match="##library.category##" replace="${library.category}" flags="g" />
278+
<replaceregexp file="${file}" match="##library.categories##" replace="${library.categories}" flags="g" />
276279
<replaceregexp file="${file}" match="##library.sentence##" replace="${library.sentence}" flags="g" />
277280
<replaceregexp file="${file}" match="##library.paragraph##" replace="${library.paragraph}" flags="g" />
278281
<replaceregexp file="${file}" match="##library.keywords##" replace="${library.keywords}" flags="g" />
@@ -289,15 +292,15 @@ ${line}
289292

290293

291294
<target name="generate.install.library" if="is.normal">
292-
<copy file="${install.source}" tofile="${project.dist.version}/INSTALL.txt" />
295+
<copy file="${install.source}" tofile="${install.destination}" />
293296

294297
<antcall target="parse.file"><param name="file" value="${install.destination}"/></antcall>
295298
</target>
296299

297300

298301

299302
<target name="generate.zip" if="is.normal">
300-
<!-- zip the distribution of the library -->
303+
<!-- zip the distribution of the Library -->
301304

302305
<move todir="${project.dist.version}/tmp/${project.name}">
303306
<fileset dir="${project.dist.version}/${project.name}" />

0 commit comments

Comments
 (0)