MBXHttpServiceInterceptorInterface

@protocol MBXHttpServiceInterceptorInterface

Interface for intercepting and modifying HttpService function calls.

  • The function to intercept HTTP requests with.

    Declaration

    Objective-C

    - (void)onRequestForRequest:(nonnull MBXHttpRequest *)request
                   continuation:
                       (nonnull MBXHttpServiceInterceptorRequestContinuation)
                           continuation;

    Parameters

    request

    The original HttpRequest object to be modified.

    continuation

    Callback to be invoked once the interceptor has finished processing the request. Can also be invoked with a HttpResponse, in which case the request completes immediately.

  • The function to intercept HTTP responses with.

    Declaration

    Objective-C

    - (void)onResponseForResponse:(nonnull MBXHttpResponse *)response
                     continuation:
                         (nonnull MBXHttpServiceInterceptorResponseContinuation)
                             continuation;

    Parameters

    response

    The original HttpResponse object to be modified. Note: certain requests have their response body written to disk. In that case, the field HttpResponseData.body will be empty.

    continuation

    Callback to be invoked once the interceptor has finished processing the response.