Skip to content

Support SetParameter request on the client #1152

Description

@davidkleiven

Hi,

is there currently a way of setting parameters via a SetParameter request on the client?

If there is currently no way of doing this I am happy to contribute with an implementation. I guess it would follow the same pattern as the other requests e.g. something along the lines of

func (c *Client) SetParameter(body []byte) (*base.Response, error) {
    cres := make(chan clientRes)

    req := &base.Request{
        Method: base.SetParameter,
        URL:    c.baseURL,
        Header: base.Header{
            "Content-Type": base.HeaderValue{"text/parameters"},
        },
        Body: body,
    }

    select {
    case c.chSetParameter <- setParameterReq{
        req: req,
        res: cres,
    }:
        res := <-cres
        return res.res, res.err

    case <-c.done:
        return nil, c.closeError
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions