public class SlackRequest
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
javax.net.ssl.HttpsURLConnection |
conn |
java.util.Map<java.lang.String,java.lang.String> |
headers |
java.lang.String |
lastResponse |
java.lang.String |
method |
java.lang.String |
requestUrl |
java.lang.String |
userAgent |
| Constructor and Description |
|---|
SlackRequest() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gson.JsonArray |
asJsonArray()
Getting last response as google GAON JsonArray
|
com.google.gson.JsonObject |
asJsonObject()
Getting last response as google JsonObject
|
SlackRequest |
connect(java.lang.String requestUrl)
Opens HTTPS connection and save connection Handler
|
SlackRequest |
delete()
Settings method as DELETE, keeping interface fluid
|
SlackRequest |
payload(com.google.gson.JsonObject payload) |
SlackRequest |
post()
Settings method as post, keeping interface fluid
|
SlackRequest |
put()
Settings method as PUT, keeping interface fluid
|
SlackRequest |
read()
Saving response into local string variable
|
public java.lang.String userAgent
public javax.net.ssl.HttpsURLConnection conn
public java.lang.String requestUrl
public java.lang.String method
public java.lang.String lastResponse
public java.util.Map<java.lang.String,java.lang.String> headers
public SlackRequest post()
public SlackRequest put()
public SlackRequest delete()
public SlackRequest connect(java.lang.String requestUrl) throws NotificationException
NotificationException - in case of any errorpublic SlackRequest read() throws NotificationException
NotificationException - in case of any errorpublic SlackRequest payload(com.google.gson.JsonObject payload)
public com.google.gson.JsonObject asJsonObject()
public com.google.gson.JsonArray asJsonArray()