Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (29 sloc) 1.318 kb
fccc685 Initial open-source release
MLstate authored
1 %% Request lines :
2
3 %
4 % Copyright © 2011 MLstate
5 %
6 % This file is part of OPA.
7 %
8 % OPA is free software: you can redistribute it and/or modify it under the
9 % terms of the GNU Affero General Public License, version 3, as published by
10 % the Free Software Foundation.
11 %
12 % OPA is distributed in the hope that it will be useful, but WITHOUT ANY
13 % WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 % FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
15 % more details.
16 %
17 % You should have received a copy of the GNU Affero General Public License
18 % along with OPA. If not, see <http://www.gnu.org/licenses/>.
19 %
20 -define Get (uri, v) = "GET " uri " HTTP/" v "\r\n"
21 -define Head (uri, v) = "HEAD " uri " HTTP/" v "\r\n"
22 -define Post (uri, v) = "POST " uri " HTTP/" v "\r\n"
23 -define Put (uri, v) = "PUT " uri " HTTP/" v "\r\n"
24 -define Del (uri, v) = "DELETE " uri " HTTP/" v "\r\n"
25 -define Trace (uri, v) = "TRACE " uri " HTTP/" v "\r\n"
26 -define Conn (uri, v) = "CONNECT " uri " HTTP/" v "\r\n"
27 -define Opts (uri, v) = "OPTIONS " uri " HTTP/" v "\r\n"
28
29 %%% Reponse <- Status line (header crlf)* crlf (Message body)?
30 %% Status-Line, v) = HTTP-Version SP Status-Code SP Reason-Phrase CRLF :
31 -define Sl (vs, code:int, reason) = "HTTP/" vs " " code " " reason "\r\n"
Something went wrong with that request. Please try again.