http_appender | R Documentation |
Send messages in the body of HTTP requests. Responses with status code 400 or above will trigger errors.
Requires the httr
package.
http_appender(url, method = "POST", layout = default_log_layout(), ...)
url |
The URL to submit messages to. |
method |
The HTTP method to use, usually |
layout |
A layout function taking a |
... |
Further arguments passed on to |
appenders
for more information on Appenders.
## Not run: # POST messages to localhost. appender <- http_appender("localhost") appender("INFO", "Message.") # POST JSON-encoded messages. appender <- http_appender( "localhost", method = "POST", layout = default_log_layout(), httr::content_type_json() ) appender("INFO", "Message.") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.