Closed nick70007 closed 2 years ago
Use https://sdwebimage.github.io/SDWebImage/Classes/SDWebImageDownloaderConfig.html#/c:objc(cs)SDWebImageDownloaderConfig(py)acceptableStatusCodes to change the accept status code.
Or you can use the Response Modifier to filter and map this 405 response to 200.
how do i do it with request modifer and where i have to call it in my swift ui app @dreampiggy sir
Hello sir, in my SwiftUI app i am storing images to IPFS Data Store and they have recently made the url as a POST request from GET request. In that case the third party library is not able to render the image. How can i resolve this?
This is the example url i am trying to render
https://ipfs.infura.io:5001/api/v0/cat?arg=QmVHLDEY4DhzJeW7G47QgpdibU6QX8g8He6CS83qRbpcDB
This is the exact error i get:
Error Domain=SDWebImageErrorDomain Code=2001 "Download marked as failed because of invalid response status code 405" UserInfo={SDWebImageErrorDownloadResponseKey=<NSHTTPURLResponse: 0x600000ed8340> { URL: https://ipfs.infura.io:5001/api/v0/cat?arg=QmVHLDEY4DhzJeW7G47QgpdibU6QX8g8He6CS83qRbpcDB } { Status Code: 405, Headers { "Content-Length" = ( 28 ); "Content-Type" = ( "text/plain; charset=utf-8" ); Date = ( "Thu, 03 Mar 2022 17:20:01 GMT" ); Vary = ( Origin ); "X-Content-Type-Options" = ( nosniff ); "X-Robots-Tag" = ( noindex ); } }, NSLocalizedDescription=Download marked as failed because of invalid response status code 405, SDWebImageErrorDownloadStatusCodeKey=405}
My code snippet:
ForEach(vm.item.tabImagesArray.indices, id: .self) { index in