Skip to content

Commit d57e217

Browse files
fix(NetworkModule) - form-data fixes based upon comments
1 parent 51e62f5 commit d57e217

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ReactWindows/ReactNative/Modules/Network/NetworkingModule.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ public void sendRequest(
117117
}
118118
else if ((uri = data.Value<string>("uri")) != null)
119119
{
120-
throw new NotImplementedException("HTTP handling for file payloads not yet implemented.");
120+
if (headerData.ContentType == null)
121+
{
122+
OnRequestError(requestId, "Payload is set but no 'content-type' header specified.", false);
123+
return;
124+
}
125+
126+
throw new NotImplementedException("URI upload is not supported");
121127
}
122128
else if ((formData = data.Value<JArray>("formData")) != null)
123129
{
@@ -131,8 +137,6 @@ public void sendRequest(
131137
{
132138
var fieldName = content.Value<string>("fieldName");
133139

134-
var formDataHeaders = content.Value<JArray>("headers");
135-
136140
var stringContent = content.Value<string>("string");
137141
if (stringContent != null)
138142
{
@@ -141,8 +145,6 @@ public void sendRequest(
141145
}
142146

143147
request.Content = formDataContent;
144-
// TODO: Check for gzipped body content
145-
// TODO: Issue #383
146148
}
147149
}
148150

0 commit comments

Comments
 (0)