http_response: Form and send an http response to a socket

Description Usage Arguments Details Value Author(s) See Also

View source: R/websockets.R

Description

Form and send an http response to a socket

Usage

1
http_response(socket, status=200, content_type="text/html; charset=UTF-8", content="", headers=c())

Arguments

socket

A socket descriptor.

status

An http numeric status code.

content_type

The http content type.

content

The http content (normally of type raw).

headers

List or vector of additional headers to send with the response. All items must be named. Do not include Date, Content-Type or Content-Length headers.

Details

Form an http response and send it to the specified socket, closing the socket connection when done.

Value

NULL is invisibly returned

Author(s)

B. W. Lewis <blewis@illposed.net>

See Also

createContext create_server


rstudio/R-Websockets documentation built on May 28, 2019, 4:33 a.m.