Documentation ¶
Overview ¶
Package request - contains common methods for JSON over HTTP communications
Index ¶
- type HttpCommunications
- type HttpCommunicator
- func (c *HttpCommunicator) Delete(url string) error
- func (c *HttpCommunicator) GetJSON(url string) ([]byte, error)
- func (c *HttpCommunicator) SendJSON(url string, data interface{}) error
- func (c *HttpCommunicator) SendMessage(url string, message *fcrmessages.FCRMessage) (*fcrmessages.FCRMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpCommunications ¶
type HttpCommunications interface { GetJSON(url string) ([]byte, error) SendJSON(url string, data interface{}) error SendMessage(url string, message *fcrmessages.FCRMessage) (*fcrmessages.FCRMessage, error) Delete(url string) error }
HttpCommunications - facilitates communications between nodes using HTTP
func NewHttpCommunicator ¶
func NewHttpCommunicator() HttpCommunications
type HttpCommunicator ¶
func (*HttpCommunicator) Delete ¶
func (c *HttpCommunicator) Delete(url string) error
Delete request to delete a resource
func (*HttpCommunicator) GetJSON ¶
func (c *HttpCommunicator) GetJSON(url string) ([]byte, error)
GetJSON request Get JSON
func (*HttpCommunicator) SendJSON ¶
func (c *HttpCommunicator) SendJSON(url string, data interface{}) error
SendJSON request Send JSON
func (*HttpCommunicator) SendMessage ¶
func (c *HttpCommunicator) SendMessage(url string, message *fcrmessages.FCRMessage) (*fcrmessages.FCRMessage, error)
SendMessage request Send JSON
Click to show internal directories.
Click to hide internal directories.