Interface HttpClientPort
- All Known Implementing Classes:
OkHttpClientAdapter
public interface HttpClientPort
Port for HTTP client operations.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classException thrown when HTTP download fails. -
Method Summary
Modifier and TypeMethodDescriptiondownloadContent(String url) Downloads content from a URL.booleanisAccessible(String url) Checks if a URL is accessible.
-
Method Details
-
downloadContent
Downloads content from a URL.- Parameters:
url- URL to download from- Returns:
- content as string
- Throws:
HttpClientPort.HttpDownloadException- if download fails
-
isAccessible
Checks if a URL is accessible.- Parameters:
url- URL to check- Returns:
- true if accessible, false otherwise
-