com.tle.common.scripting.types
Interface ConnectionScriptType
Declaration: public interface ConnectionScriptType extends java.io.Serializable
All Superinterfaces: java.io.Serializable

 

Used for connecting to external sites from the server.

 

 

Methods Summary
abstract void addFormData(java.lang.String key, java.lang.String value)
    
Add some data to be sent in the next call to getResponse(boolean) This means that if you call getResponse(boolean) with the doGET parameter set to true, the query string of the original URL will be modified to append the additional data.
abstract ResponseScriptType getResponse(boolean doGET)
    
Retrieve data from the connection via GET or POST depending on the value of parameter doGET

 

 

 

 

addFormData

 

public abstract void addFormData( java.lang.String key,
java.lang.String value)

 

Add some data to be sent in the next call to getResponse(boolean) This means that if you call getResponse(boolean) with the doGET parameter set to true, the query string of the original URL will be modified to append the additional data.

 

Parameters:
key-
The key of the form data
value-
The value of the data

 

 

 

getResponse

 

public abstract ResponseScriptType getResponse( boolean doGET)

 

Retrieve data from the connection via GET or POST depending on the value of parameter doGET

 

Parameters:
doGET-
Perform a GET request (the target URL will be modified with the values in the form data that have been added using addFormData(String, String) ). If false, a POST will be performed.
Returns:
The response from the external site