annotate OrthancFramework/Sources/HttpServer/IHttpHandler.cpp @ 4444:11ea0a05115b

new function in OrthancPluginCppWrapper: ReadJsonWithoutComments()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 13 Jan 2021 09:19:32 +0100
parents d9473bd5ed43
children c8f444e8556d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4330
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public License
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Lesser General Public License for more details.
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * License along with this program. If not, see
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * <http://www.gnu.org/licenses/>.
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 **/
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #include "../PrecompiledHeaders.h"
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "IHttpHandler.h"
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "HttpOutput.h"
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #include "HttpToolbox.h"
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #include "StringHttpOutput.h"
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 static const char* LOCALHOST = "127.0.0.1";
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 namespace Orthanc
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 bool IHttpHandler::SimpleGet(std::string& result,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 IHttpHandler& handler,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 RequestOrigin origin,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 const std::string& uri,
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
39 const HttpToolbox::Arguments& httpHeaders)
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 UriComponents curi;
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
42 HttpToolbox::GetArguments getArguments;
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 HttpToolbox::ParseGetQuery(curi, getArguments, uri.c_str());
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 StringHttpOutput stream;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 HttpOutput http(stream, false /* no keep alive */);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 if (handler.Handle(http, origin, LOCALHOST, "", HttpMethod_Get, curi,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 httpHeaders, getArguments, NULL /* no body for GET */, 0))
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 stream.GetOutput(result);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 return true;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 else
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 return false;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 static bool SimplePostOrPut(std::string& result,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 IHttpHandler& handler,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 RequestOrigin origin,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 HttpMethod method,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 const std::string& uri,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 const void* bodyData,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 size_t bodySize,
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
68 const HttpToolbox::Arguments& httpHeaders)
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 {
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
70 HttpToolbox::GetArguments getArguments; // No GET argument for POST/PUT
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 UriComponents curi;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 Toolbox::SplitUriComponents(curi, uri);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 StringHttpOutput stream;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 HttpOutput http(stream, false /* no keep alive */);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 if (handler.Handle(http, origin, LOCALHOST, "", method, curi,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 httpHeaders, getArguments, bodyData, bodySize))
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 stream.GetOutput(result);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 return true;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 else
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 return false;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 bool IHttpHandler::SimplePost(std::string& result,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 IHttpHandler& handler,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 RequestOrigin origin,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 const std::string& uri,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 const void* bodyData,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 size_t bodySize,
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
97 const HttpToolbox::Arguments& httpHeaders)
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 return SimplePostOrPut(result, handler, origin, HttpMethod_Post, uri, bodyData, bodySize, httpHeaders);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 bool IHttpHandler::SimplePut(std::string& result,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 IHttpHandler& handler,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 RequestOrigin origin,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 const std::string& uri,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 const void* bodyData,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 size_t bodySize,
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
109 const HttpToolbox::Arguments& httpHeaders)
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 return SimplePostOrPut(result, handler, origin, HttpMethod_Put, uri, bodyData, bodySize, httpHeaders);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 bool IHttpHandler::SimpleDelete(IHttpHandler& handler,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 RequestOrigin origin,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 const std::string& uri,
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
118 const HttpToolbox::Arguments& httpHeaders)
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 {
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 UriComponents curi;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 Toolbox::SplitUriComponents(curi, uri);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
4330
a01b1c9cbef4 moving generic type definitions from IHttpHandler to HttpToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4329
diff changeset
123 HttpToolbox::GetArguments getArguments; // No GET argument for DELETE
4329
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 StringHttpOutput stream;
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 HttpOutput http(stream, false /* no keep alive */);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 return handler.Handle(http, origin, LOCALHOST, "", HttpMethod_Delete, curi,
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 httpHeaders, getArguments, NULL /* no body for DELETE */, 0);
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 }
9dc0e42f868b moving static methods from HttpToolbox to IHttpHandler
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 }