Skip to Content
0
May 29, 2020 at 09:40 AM

SDK sends unintended GET Request after PUT although preferNoContent is set

92 Views

Hey,

I have the following issue in my app:

1. I send an PUT request, which responds with a 204 (as intended)

2. SDK sends a GET Request immediately afterwards (not intended)

To mitigate I use the `preferNoContent` flag but the GET request is still fired.

let options = RequestOptions()
options.sendEmptyUpdate = true
options.updateMode = .replace
options.preferNoContent = true
service.updateEntity(item, headers: .empty, options: options) { error in
    DispatchQueue.main.async {
        if let error = error {
            completion(.failure(error.niceError))
        } else {
            completion(.success(true))
        }
    }
}