Insert Authorization Header field with kingfisher lib
问题 I'm using Kingfisher to show image from url, but my endpoint requires a Authorization header. How to use these kind of url with Kingfisher or SDWebImage in iOS? 回答1: With Kingfisher you need to make a request modifier (of type AnyModifier ) and pass it as a parameter in the options part of the .kf.setImage method, and then use the trailing closure to actually set the image. Example: import Kingfisher let modifier = AnyModifier { request in var r = request // replace "Access-Token" with the