File: test_pp.ml

package info (click to toggle)
ocsigen 1.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,560 kB
  • sloc: ml: 35,873; makefile: 1,450; sh: 772; ansic: 29
file content (35 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
open Ocsigen_http_frame
open Framepp

module H = Http_header

module C =
  struct
    type t = string
    let string_of_content c = c
    let content_of_string s = s
  end


module Http = FHttp_frame (C)

module PP = Fframepp(C)

let hd1=
  {
    H.mode = H.Query;
    H.meth = Some H.GET;
    H.url = Some "pop";
    H.code = None;
    H.proto = "HTML/1.0";
    headers = []
  }




let frame = {Http.header = hd1; Http.content = Some (C.content_of_string "Bonjour")}

let _ =
  print_endline (PP.string_of_http_frame frame)