RxAlamofire icon indicating copy to clipboard operation
RxAlamofire copied to clipboard

upload(multipartFormData does not support an RequestInterceptor

Open realityworks opened this issue 4 years ago • 0 comments

There is no way to fix Authentication Token issues on 400/401 errors by reloading an authentication token.

There is also no way to extend RxAlamofire with the following :

  public func upload(multipartFormData: @escaping (MultipartFormData) -> Void,
                     to url: URLConvertible,
                     method: HTTPMethod,
                     headers: HTTPHeaders? = nil,
                     interceptor: RequestInteceptor? = nil) -> Observable<UploadRequest> {
    return request { manager in
      manager.upload(multipartFormData: multipartFormData, to: url, method: method, headers: headers, interceptor: interceptor)
    }
  }

Since the request creation function is internal, you cannot extend the Reactive RxAlamofire with a new function calling request directly.

Is there anyway to fix this without Forking?

realityworks avatar Jan 06 '21 17:01 realityworks