Skip to content

Post params #23

@karalabe

Description

@karalabe

Hi,

A while back there was a fix to include query parameters in POST requests too (#12). There is a small inconsistency with the API now, in that Session.Post accepts a payload, but no params, meaning that I cannot - easily - set query parameters as for Get, but rather have to manually construct a request to add the parameters:

session.Get(url, &params, res, nil)

versus

req := &napping.Request{
    Method: "POST",
    Url:    url,
    Params: &params, // <- setting this one is missing from the API
    Result: res,
    Error:  nil,
}
rep, err := session.Send(req)
// ...

Cheers,
Peter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions