Skip to content

Ability to specify HTTP Method (GET, POST, ...) when using "newRequest" template function. #800

@MartyX98

Description

@MartyX98

Description

custom-api widget's go template function "newRequest" has sub functions "withHeader" and "withParameter" but has no function to specify the HTTP Method request type. I would like to add a function "withMethod" to specify the method type. The idea is to be able to do this;

{{ 
  $response := newRequest ${API_URL}
    | withMethod "POST"
    | withParameter "paramName" "paramValue"
    | getResponse
}}

As per the contribution's guidelines, I am making this feature request first and I intend to develop this myself. I will link the PR both here and this feature request in the PR.

Edit: Pull Request

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions