As per this link the NSURLSession automatically includes a default user agent in this format:
$(CFBundleName)/$(CFBundleVersion) CFNetwork/808.3 Darwin/17.2.0
I believe this is cause of an issue currently blocking me from using Shiny.Net.Http in my iOS app, where all requests to download files from our AWS CDN fail with a 403 error. The URL passed in to the download task is correct, works in the browser and on Android.
According to that same link, next answer further down on the page, the NSURLSessionConfiguration allows you to specify user agent header like so:
config.httpAdditionalHeaders = ["User-Agent": "myapp User-Agent"]
API Changes
Add a new nullable string property to AppleConfiguration for CustomUserAgent.
Check if null or empty where AppleConfig values are mapped to NSURLConfiguration and set custom user agent string.
Intended Use Case
For scenario where backend server requires specific user agents to be used.
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Summary
As per this link the NSURLSession automatically includes a default user agent in this format:
$(CFBundleName)/$(CFBundleVersion) CFNetwork/808.3 Darwin/17.2.0
I believe this is cause of an issue currently blocking me from using Shiny.Net.Http in my iOS app, where all requests to download files from our AWS CDN fail with a 403 error. The URL passed in to the download task is correct, works in the browser and on Android.
According to that same link, next answer further down on the page, the NSURLSessionConfiguration allows you to specify user agent header like so:
config.httpAdditionalHeaders = ["User-Agent": "myapp User-Agent"]
API Changes
Add a new nullable string property to AppleConfiguration for CustomUserAgent. Check if null or empty where AppleConfig values are mapped to NSURLConfiguration and set custom user agent string.
Intended Use Case
For scenario where backend server requires specific user agents to be used.
Code of Conduct