From d03367c56005470396d883d273323ecbd8d4f243 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Tue, 14 Mar 2017 13:52:27 +0100 Subject: Add implementation for POST /config/reload apiV4 - Reload Configuration (#5713) --- model/client4.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model') diff --git a/model/client4.go b/model/client4.go index e9644ada0..799fec802 100644 --- a/model/client4.go +++ b/model/client4.go @@ -1131,6 +1131,16 @@ func (c *Client4) GetConfig() (*Config, *Response) { } } +// ReloadConfig will reload the server configuration. +func (c *Client4) ReloadConfig() (bool, *Response) { + if r, err := c.DoApiPost(c.GetConfigRoute()+"/reload", ""); err != nil { + return false, &Response{StatusCode: r.StatusCode, Error: err} + } else { + defer closeBody(r) + return CheckStatusOK(r), BuildResponse(r) + } +} + func (c *Client4) DatabaseRecycle() (bool, *Response) { if r, err := c.DoApiPost(c.GetDatabaseRoute()+"/recycle", ""); err != nil { return false, &Response{StatusCode: r.StatusCode, Error: err} -- cgit v1.2.3-1-g7c22