Skip to content

Commit

Permalink
Initial version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wouter Koppenol committed May 29, 2017
1 parent 73285cd commit 1aff5a5
Show file tree
Hide file tree
Showing 8 changed files with 544 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/
17 changes: 17 additions & 0 deletions .nb-gradle-properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gradle-project-properties>
<!--DO NOT EDIT THIS FILE! - Used by the Gradle plugin of NetBeans.-->
<common-tasks>
<task>
<display-name>Refresh Dependencies</display-name>
<non-blocking>no</non-blocking>
<task-names>
<name must-exist="yes">build</name>
</task-names>
<task-args>
<arg>--refresh-dependencies</arg>
</task-args>
<task-jvm-args/>
</task>
</common-tasks>
</gradle-project-properties>
46 changes: 46 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apply plugin: 'java'

sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}

repositories {
mavenCentral()
jcenter() //This prevents issues with transitive dependencies
maven {
url "https://jitpack.io"
}
// You may define additional repositories, or even remove "mavenCentral()".
// Read more about repositories here:
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:repositories
}

dependencies {
// TODO: Add dependencies here ...
// You can read more about how to add dependency here:
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:how_to_declare_your_dependencies
testCompile group: 'junit', name: 'junit', version: '4.10'
compile 'org.apache.httpcomponents:httpclient:4.2.3'
}


jar {
manifest {
attributes 'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'nl.wotuu.wotuubot.Main'
}
from {
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
}
}

1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'JWebRequest'
30 changes: 30 additions & 0 deletions src/main/java/nl/wotuu/jwebrequest/CustomWebRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package nl.wotuu.jwebrequest;

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/


/**
*
* @author wouter.koppenol
*/
public class CustomWebRequest extends WebRequest {

public CustomWebRequest(String fullURL) {
super(fullURL);
}

@Override
public WebResponse execute() {
return super.execute("");
}

@Override
public String getDescription() {
return "A custom request to any web address";
}

}
18 changes: 18 additions & 0 deletions src/main/java/nl/wotuu/jwebrequest/HttpMethod.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package nl.wotuu.jwebrequest;

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/


/**
* Created by Wouter on 07/06/13.
*/
public enum HttpMethod {
GET,
POST,
PUT,
DELETE
}
Loading

0 comments on commit 1aff5a5

Please sign in to comment.