annotate OrthancCppClient/HttpEnumerations.cpp @ 458:84966299c8f8

ThreadedCommandProcessor
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Jul 2013 16:10:42 +0200
parents 1188cb0ddaa5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
416
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege,
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Belgium
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * Permission is hereby granted, free of charge, to any person
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * obtaining a copy of this software and associated documentation
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * files (the "Software"), to deal in the Software without
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * restriction, including without limitation the rights to use, copy,
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * modify, merge, publish, distribute, sublicense, and/or sell copies
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * of the Software, and to permit persons to whom the Software is
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * furnished to do so, subject to the following conditions:
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 *
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * The above copyright notice and this permission notice shall be
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * included in all copies or substantial portions of the Software.
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * SOFTWARE.
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 **/
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #include "HttpEnumerations.h"
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 const char* Orthanc_HttpMethod_ToString(Orthanc_HttpMethod method)
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 switch (method)
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 case Orthanc_HttpMethod_Get:
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 return "GET";
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 case Orthanc_HttpMethod_Post:
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 return "POST";
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 case Orthanc_HttpMethod_Delete:
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 return "DELETE";
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 case Orthanc_HttpMethod_Put:
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 return "PUT";
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 default:
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 return "?";
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 }
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 }
1188cb0ddaa5 http method faking
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50