-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
StringContent(String, Encoding, String)
The third parameter is mediaType String
The media type to use for the content.
When I pass "application/base64" as the mediaType, I got the following error message.
new StringContent(fileContent, Encoding.UTF8, "application/base64")The best overloaded method match for 'System.Net.Http.StringContent.StringContent(string, System.Text.Encoding, string)' has some invalid arguments
ExceptionType:Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
Assembly:Anonymously Hosted DynamicMethods Assembly
Method:System.Net.Http.StringContent CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Type, System.Object, System.Text.Encoding, System.String)
I find the media type from this page.
I am not sure if this class can support all media types.
I wonder if you guys can list how many media types are supported for StringContent's constructor.