Package org.sonarqube.ws.client
Interface WsResponse
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
MockWsResponse
- Since:
- 5.3
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intcode()HTTP status codecontent()Throws aHttpExceptionifisSuccessful()is false.booleanheaders()booleanReturns true if the code is in [200..300), which means the request was successfully received, understood, and accepted.The absolute requested URL
-
Method Details
-
requestUrl
String requestUrl()The absolute requested URL -
code
int code()HTTP status code -
isSuccessful
boolean isSuccessful()Returns true if the code is in [200..300), which means the request was successfully received, understood, and accepted. -
failIfNotSuccessful
WsResponse failIfNotSuccessful()Throws aHttpExceptionifisSuccessful()is false. -
contentType
String contentType() -
header
-
headers
-
hasContent
boolean hasContent() -
contentStream
InputStream contentStream() -
contentReader
Reader contentReader() -
content
String content() -
close
void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-