File: post.R

package info (click to toggle)
r-cran-rcurl 1.95-4.8-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,140 kB
  • ctags: 515
  • sloc: ansic: 3,135; xml: 1,734; asm: 993; sh: 12; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
library(RCurl)
u = "http://requestb.in/168944w1"

json = '{
      "project": 1,
          "event_id": "fc6d8c0c43fc4630ad850ee518f1b9d0",
          "culprit": "my.module.function_name",
          "timestamp": "2011-05-02T17:41:36",
          "message": "SyntaxError: Wattttt!"
          "sentry.interfaces.Exception": {
                    "type": "SyntaxError":
                              "value": "Wattttt!",
                              "module": "__builtins__"
                  }
    }'

hdr = c('X-Sentry-Auth' = 'Sentry sentry_version=2.0, sentry_signature=a3901c854752a61636560638937237c8d7a9561d, sentry_timestamp=1329096377, sentry_key=b70a31b3510c4cf793964a185cfe1fd0, sentry_client=raven-python/1.0')


httpPOST(u, httpheader = hdr, postfields = json, verbose = TRUE)