Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: third_party/WebKit/Source/modules/fetch/Request.cpp

Issue 2292763002: [Fetch API] Implement Request.formData and Response.formData. (Closed)
Patch Set: More global-interface-listing*-expected.txt, urlencoded-parser-expected.txt Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/Request.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Request.cpp b/third_party/WebKit/Source/modules/fetch/Request.cpp
index db0e5496be2e3d18425f711e07e87570698683e8..b565a45e6597e33c7bd3d358d3ba8cc7f6970845 100644
--- a/third_party/WebKit/Source/modules/fetch/Request.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Request.cpp
@@ -752,6 +752,12 @@ String Request::MimeType() const {
return request_->MimeType();
}
+String Request::ContentType() const {
+ String result;
+ request_->HeaderList()->Get(HTTPNames::Content_Type, result);
+ return result;
+}
+
void Request::RefreshBody(ScriptState* script_state) {
v8::Local<v8::Value> request = ToV8(this, script_state);
if (request.IsEmpty()) {
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Request.h ('k') | third_party/WebKit/Source/modules/fetch/Response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698