Package org.symphonyoss.symphony.jcurl
Class JCurl.Response
- java.lang.Object
-
- org.symphonyoss.symphony.jcurl.JCurl.Response
-
-
Constructor Summary
Constructors Constructor Description Response()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCipherSuite()Certificate[]getClientCertificates()StringgetContentType()Return the content type of the response.StringgetCookie(String name)Map<String,String>getCookies()List<String>getHeader(String name)Map<String,List<String>>getHeaders()com.fasterxml.jackson.databind.JsonNodegetJsonNode()Return the parsed JSON response, if any.StringgetOutput()intgetResponseCode()Certificate[]getServerCertificates()StringgetTag(int index)StringgetTag(String key)List<String>getTagList()Return a copy of the list of all tags captured as a result of a call to {@link Builder.extract(String)}Map<String,String>getTagMap()Return a copy of the map of all tags captured as a result of a call to {@link Builder.extract(String,String)}longgetTimeTaken()voidprint()Print response data and optional meta information.
-
-
-
Method Detail
-
print
public void print() throws CertificateParsingException, IOExceptionPrint response data and optional meta information. Unless a different configuration is specified with JCurl.Builder, only prints response data. Response is interpreted as application/json by default; this can be changed with -H Content-Type your/mimetype.
-
getResponseCode
public int getResponseCode()
- Returns:
-
getTimeTaken
public long getTimeTaken()
- Returns:
-
getCipherSuite
public String getCipherSuite()
- Returns:
-
getServerCertificates
public Certificate[] getServerCertificates()
- Returns:
-
getClientCertificates
public Certificate[] getClientCertificates()
- Returns:
-
getOutput
public String getOutput()
- Returns:
-
getTagMap
public Map<String,String> getTagMap()
Return a copy of the map of all tags captured as a result of a call to {@link Builder.extract(String,String)}- Returns:
- a copy of the map of named tags.
-
getTagList
public List<String> getTagList()
Return a copy of the list of all tags captured as a result of a call to {@link Builder.extract(String)}- Returns:
- a copy of the list of indexed tags.
-
getTag
public String getTag(int index)
- Parameters:
index-- Returns:
-
getContentType
public String getContentType()
Return the content type of the response.- Returns:
- The MIME type of the response.
-
getJsonNode
public com.fasterxml.jackson.databind.JsonNode getJsonNode() throws IOExceptionReturn the parsed JSON response, if any.- Returns:
- A JsonNode representing the response or null.
- Throws:
IOException
-
-