Package com.avoka.tm.http
Class RequestBuilder
java.lang.Object
com.avoka.tm.http.RequestBuilder
Provides a HTTP Request Builder class.
Examples
Please find the Components HTTP Request Builder examples below.
Building Get Request Example
This Groovy example shows how to build GetRequest object
 import com.avoka.tm.http.*
 import com.avoka.tm.vo.*
 SvcConn svcConn = svcDef.svcConn
 String path = "https://service.mycorp.com/..."
 GetRequest get = new RequestBuilder()
     .setSvcConn(svcConn)
     .setPath(path)
     .buildGet()  
 Building Post Request Example
This Groovy example shows how to build PostRequest object.
 import com.avoka.tm.http.*
 import com.avoka.tm.vo.*
 SvcConn svcConn = svcDef.svcConn
 String path = "https://service.mycorp.com/..."
 PostRequest post = new RequestBuilder()
     .setSvcConn(svcConn)
     .setPath(path)
     .buildPost(); - Since:
- 5.0.0
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn a new DeleteRequest object from the service connection parameter.buildGet()Return a new GetRequest object from the service connection parameter.Return a new PatchRequest object from the service connection parameter.Return a new PostRequest object from the service connection parameter.buildPut()Return a new PutRequest object from the service connection parameter.Set the path to append the to service connection endpoint for the request URL.setSvcConn(SvcConn svcConn) Set the service connection parameter.
- 
Constructor Details- 
RequestBuilderpublic RequestBuilder()
 
- 
- 
Method Details- 
setPathSet the path to append the to service connection endpoint for the request URL.- Parameters:
- path- the to append the to service connection endpoint for the request URL
- Returns:
- the request builder
 
- 
setSvcConnSet the service connection parameter.- Parameters:
- svcConn- the service connection parameter
- Returns:
- the request builder
 
- 
buildDeleteReturn a new DeleteRequest object from the service connection parameter.- Returns:
- a new DeleteRequest object from the service connection parameter
 
- 
buildGetReturn a new GetRequest object from the service connection parameter.- Returns:
- a new GetRequest object from the service connection parameter
 
- 
buildPatchReturn a new PatchRequest object from the service connection parameter.- Returns:
- a new PatchRequest object from the service connection parameter
 
- 
buildPostReturn a new PostRequest object from the service connection parameter.- Returns:
- a new PostRequest object from the service connection parameter
 
- 
buildPutReturn a new PutRequest object from the service connection parameter.- Returns:
- a new PutRequest object from the service connection parameter
 
 
-