Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要发送OPTIONS请求。使用 Flurl 时如何构建客户端?
OPTIONS
用于SendAsync指定不直接支持的动词:
SendAsync
"http://myapi.com".SendAsync(System.Net.Http.HttpMethod.Options);
如果您需要发送内容(可能与 OPTIONS 无关),则有一个可选的HttpContentarg,并且有SendJsonAsync、SendStringAsync和SendUrlEncodedAsync扩展名可以使这更容易。
HttpContent
SendJsonAsync
SendStringAsync
SendUrlEncodedAsync