Interface ExternalApiReader.ResponseParser

Enclosing class:
ExternalApiReader
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ExternalApiReader.ResponseParser
Response parser functional interface. Allows users to customize how to extract markdown from API response.
  • Method Summary

    Modifier and Type
    Method
    Description
    parseResponse(okhttp3.Response response, okhttp3.OkHttpClient httpClient)
    Parses markdown text from HTTP response.
  • Method Details

    • parseResponse

      String parseResponse(okhttp3.Response response, okhttp3.OkHttpClient httpClient) throws Exception
      Parses markdown text from HTTP response.
      Parameters:
      response - OkHttp Response object
      httpClient - OkHttpClient instance (can be used for subsequent requests like polling task status)
      Returns:
      Parsed markdown text
      Throws:
      Exception - if parsing fails