glanceapp / glanceapp/glance

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

Open
#800 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Go
Stars
37.1k
Forks
1.5k
Avg merge
1h 11m
Merged PRs (30d)
1

Description

### 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](https://github.com/glanceapp/glance/pull/801)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.