OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 3 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 22 matching lines...) Expand all Loading... |
33 #define HTTPRequest_h | 33 #define HTTPRequest_h |
34 | 34 |
35 #include "platform/PlatformExport.h" | 35 #include "platform/PlatformExport.h" |
36 #include "platform/network/HTTPHeaderMap.h" | 36 #include "platform/network/HTTPHeaderMap.h" |
37 #include "platform/network/HTTPParsers.h" | 37 #include "platform/network/HTTPParsers.h" |
38 #include "platform/weborigin/KURL.h" | 38 #include "platform/weborigin/KURL.h" |
39 #include "wtf/PassRefPtr.h" | 39 #include "wtf/PassRefPtr.h" |
40 #include "wtf/RefCounted.h" | 40 #include "wtf/RefCounted.h" |
41 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace blink { |
44 | 44 |
45 class PLATFORM_EXPORT HTTPRequest : public RefCounted<HTTPRequest> { | 45 class PLATFORM_EXPORT HTTPRequest : public RefCounted<HTTPRequest> { |
46 public: | 46 public: |
47 static PassRefPtr<HTTPRequest> create() { return adoptRef(new HTTPRequest())
; } | 47 static PassRefPtr<HTTPRequest> create() { return adoptRef(new HTTPRequest())
; } |
48 static PassRefPtr<HTTPRequest> create(const String& requestMethod, const KUR
L& url, HTTPVersion version) { return adoptRef(new HTTPRequest(requestMethod, ur
l, version)); } | 48 static PassRefPtr<HTTPRequest> create(const String& requestMethod, const KUR
L& url, HTTPVersion version) { return adoptRef(new HTTPRequest(requestMethod, ur
l, version)); } |
49 static PassRefPtr<HTTPRequest> parseHTTPRequestFromBuffer(const char* data,
size_t length, String& failureReason); | 49 static PassRefPtr<HTTPRequest> parseHTTPRequestFromBuffer(const char* data,
size_t length, String& failureReason); |
50 virtual ~HTTPRequest(); | 50 virtual ~HTTPRequest(); |
51 | 51 |
52 String requestMethod() const { return m_requestMethod; } | 52 String requestMethod() const { return m_requestMethod; } |
53 void setRequestMethod(const String& method) { m_requestMethod = method; } | 53 void setRequestMethod(const String& method) { m_requestMethod = method; } |
(...skipping 16 matching lines...) Expand all Loading... |
70 size_t parseHeaders(const char* data, size_t length, String& failureReason); | 70 size_t parseHeaders(const char* data, size_t length, String& failureReason); |
71 size_t parseRequestBody(const char* data, size_t length); | 71 size_t parseRequestBody(const char* data, size_t length); |
72 | 72 |
73 KURL m_url; | 73 KURL m_url; |
74 HTTPVersion m_httpVersion; | 74 HTTPVersion m_httpVersion; |
75 String m_requestMethod; | 75 String m_requestMethod; |
76 HTTPHeaderMap m_headerFields; | 76 HTTPHeaderMap m_headerFields; |
77 Vector<unsigned char> m_body; | 77 Vector<unsigned char> m_body; |
78 }; | 78 }; |
79 | 79 |
80 } // namespace WebCore | 80 } // namespace blink |
81 | 81 |
82 #endif // HTTPRequest_h | 82 #endif // HTTPRequest_h |
OLD | NEW |