Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
85ba3e19
R
runtime
项目概览
dotNET Platform
/
runtime
12 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
85ba3e19
编写于
10月 08, 2020
作者:
L
Larry Ewing
提交者:
GitHub
10月 08, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add UnsupportedOsPlatform(browser) to more synchronous http apis (#43102)
上级
66a59090
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
0 deletion
+12
-0
src/libraries/System.Net.Http/ref/System.Net.Http.cs
src/libraries/System.Net.Http/ref/System.Net.Http.cs
+5
-0
src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
...braries/System.Net.Http/src/System/Net/Http/HttpClient.cs
+5
-0
src/libraries/System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs
...System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs
+2
-0
未找到文件。
src/libraries/System.Net.Http/ref/System.Net.Http.cs
浏览文件 @
85ba3e19
...
...
@@ -90,9 +90,13 @@ public partial class HttpClient : System.Net.Http.HttpMessageInvoker
public
System
.
Threading
.
Tasks
.
Task
<
System
.
Net
.
Http
.
HttpResponseMessage
>
PutAsync
(
string
?
requestUri
,
System
.
Net
.
Http
.
HttpContent
content
,
System
.
Threading
.
CancellationToken
cancellationToken
)
{
throw
null
;
}
public
System
.
Threading
.
Tasks
.
Task
<
System
.
Net
.
Http
.
HttpResponseMessage
>
PutAsync
(
System
.
Uri
?
requestUri
,
System
.
Net
.
Http
.
HttpContent
content
)
{
throw
null
;
}
public
System
.
Threading
.
Tasks
.
Task
<
System
.
Net
.
Http
.
HttpResponseMessage
>
PutAsync
(
System
.
Uri
?
requestUri
,
System
.
Net
.
Http
.
HttpContent
content
,
System
.
Threading
.
CancellationToken
cancellationToken
)
{
throw
null
;
}
[
System
.
Runtime
.
Versioning
.
UnsupportedOSPlatformAttribute
(
"browser"
)]
public
System
.
Net
.
Http
.
HttpResponseMessage
Send
(
System
.
Net
.
Http
.
HttpRequestMessage
request
)
{
throw
null
;
}
[
System
.
Runtime
.
Versioning
.
UnsupportedOSPlatformAttribute
(
"browser"
)]
public
System
.
Net
.
Http
.
HttpResponseMessage
Send
(
System
.
Net
.
Http
.
HttpRequestMessage
request
,
System
.
Net
.
Http
.
HttpCompletionOption
completionOption
)
{
throw
null
;
}
[
System
.
Runtime
.
Versioning
.
UnsupportedOSPlatformAttribute
(
"browser"
)]
public
System
.
Net
.
Http
.
HttpResponseMessage
Send
(
System
.
Net
.
Http
.
HttpRequestMessage
request
,
System
.
Net
.
Http
.
HttpCompletionOption
completionOption
,
System
.
Threading
.
CancellationToken
cancellationToken
)
{
throw
null
;
}
[
System
.
Runtime
.
Versioning
.
UnsupportedOSPlatformAttribute
(
"browser"
)]
public
override
System
.
Net
.
Http
.
HttpResponseMessage
Send
(
System
.
Net
.
Http
.
HttpRequestMessage
request
,
System
.
Threading
.
CancellationToken
cancellationToken
)
{
throw
null
;
}
public
System
.
Threading
.
Tasks
.
Task
<
System
.
Net
.
Http
.
HttpResponseMessage
>
SendAsync
(
System
.
Net
.
Http
.
HttpRequestMessage
request
)
{
throw
null
;
}
public
System
.
Threading
.
Tasks
.
Task
<
System
.
Net
.
Http
.
HttpResponseMessage
>
SendAsync
(
System
.
Net
.
Http
.
HttpRequestMessage
request
,
System
.
Net
.
Http
.
HttpCompletionOption
completionOption
)
{
throw
null
;
}
...
...
@@ -195,6 +199,7 @@ public partial class HttpMessageInvoker : System.IDisposable
public
HttpMessageInvoker
(
System
.
Net
.
Http
.
HttpMessageHandler
handler
,
bool
disposeHandler
)
{
}
public
void
Dispose
()
{
}
protected
virtual
void
Dispose
(
bool
disposing
)
{
}
[
System
.
Runtime
.
Versioning
.
UnsupportedOSPlatformAttribute
(
"browser"
)]
public
virtual
System
.
Net
.
Http
.
HttpResponseMessage
Send
(
System
.
Net
.
Http
.
HttpRequestMessage
request
,
System
.
Threading
.
CancellationToken
cancellationToken
)
{
throw
null
;
}
public
virtual
System
.
Threading
.
Tasks
.
Task
<
System
.
Net
.
Http
.
HttpResponseMessage
>
SendAsync
(
System
.
Net
.
Http
.
HttpRequestMessage
request
,
System
.
Threading
.
CancellationToken
cancellationToken
)
{
throw
null
;
}
}
...
...
src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs
浏览文件 @
85ba3e19
...
...
@@ -5,6 +5,7 @@
using
System.Diagnostics.CodeAnalysis
;
using
System.IO
;
using
System.Net.Http.Headers
;
using
System.Runtime.Versioning
;
using
System.Threading
;
using
System.Threading.Tasks
;
...
...
@@ -439,15 +440,19 @@ public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent content
#
region
Advanced
Send
Overloads
[
UnsupportedOSPlatform
(
"browser"
)]
public
HttpResponseMessage
Send
(
HttpRequestMessage
request
)
=>
Send
(
request
,
DefaultCompletionOption
,
cancellationToken
:
default
);
[
UnsupportedOSPlatform
(
"browser"
)]
public
HttpResponseMessage
Send
(
HttpRequestMessage
request
,
HttpCompletionOption
completionOption
)
=>
Send
(
request
,
completionOption
,
cancellationToken
:
default
);
[
UnsupportedOSPlatform
(
"browser"
)]
public
override
HttpResponseMessage
Send
(
HttpRequestMessage
request
,
CancellationToken
cancellationToken
)
=>
Send
(
request
,
DefaultCompletionOption
,
cancellationToken
);
[
UnsupportedOSPlatform
(
"browser"
)]
public
HttpResponseMessage
Send
(
HttpRequestMessage
request
,
HttpCompletionOption
completionOption
,
CancellationToken
cancellationToken
)
{
// Called outside of async state machine to propagate certain exception even without awaiting the returned task.
...
...
src/libraries/System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs
浏览文件 @
85ba3e19
...
...
@@ -3,6 +3,7 @@
using
System.IO
;
using
System.Net.Http.Headers
;
using
System.Runtime.Versioning
;
using
System.Threading
;
using
System.Threading.Tasks
;
...
...
@@ -32,6 +33,7 @@ public HttpMessageInvoker(HttpMessageHandler handler, bool disposeHandler)
_disposeHandler
=
disposeHandler
;
}
[
UnsupportedOSPlatformAttribute
(
"browser"
)]
public
virtual
HttpResponseMessage
Send
(
HttpRequestMessage
request
,
CancellationToken
cancellationToken
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录