diff --git a/request.go b/request.go index 116518b..c3b6d60 100644 --- a/request.go +++ b/request.go @@ -113,7 +113,7 @@ func (c *RequestClient) doRequest(command string, params ...string) (response Ra var buf bytes.Buffer for _, req := range requests { - resp, err := c.Request(req) + resp, err := c.RawRequest(req) if err != nil { return nil, fmt.Errorf("error while doing request: %w", err) } @@ -167,7 +167,7 @@ func NewClient(socket string) *RequestClient { // '[]byte("dispatch exec kitty")'. // Keep in mind that there is no validation. In case of an invalid request, the // response will generally be something different from "ok". -func (c *RequestClient) Request(request RawRequest) (response RawResponse, err error) { +func (c *RequestClient) RawRequest(request RawRequest) (response RawResponse, err error) { if len(request) == 0 { return nil, errors.New("empty request") } diff --git a/request_test.go b/request_test.go index d1702e2..2aaf825 100644 --- a/request_test.go +++ b/request_test.go @@ -131,9 +131,9 @@ func TestValidateResponse(t *testing.T) { } } -func TestRequest(t *testing.T) { +func TestRawRequest(t *testing.T) { testCommandRR(t, func() (RawResponse, error) { - return c.Request([]byte("dispatch exec")) + return c.RawRequest([]byte("splash")) }) }