Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose HTTP method in unary handlers #509

Merged
merged 1 commit into from
May 17, 2023
Merged

Expose HTTP method in unary handlers #509

merged 1 commit into from
May 17, 2023

Conversation

akshayjshah
Copy link
Member

Fixes #502 to expose the HTTP method in handlers.

Fixes #502 to expose the HTTP method in handlers.
@akshayjshah akshayjshah requested a review from jhump May 17, 2023 14:50
Comment on lines +184 to +190
func (hc *errorTranslatingHandlerConnCloser) getHTTPMethod() string {
if methoder, ok := hc.handlerConnCloser.(interface{ getHTTPMethod() string }); ok {
return methoder.getHTTPMethod()
}
return http.MethodPost
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is unused.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, never mind, I see.

Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, shoot. I now see my error -- I had a test verifying GET only on the client side and failed to add something server side for this. Sorry about that.

Thanks for fixing!

Copy link
Contributor

@jchadwick-buf jchadwick-buf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch Akshay! Very sneaky issue.

@akshayjshah akshayjshah merged commit b16fbd1 into main May 17, 2023
@akshayjshah akshayjshah deleted the ajs/query branch May 17, 2023 17:11
renovate bot referenced this pull request in open-feature/flagd May 31, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/bufbuild/connect-go](https://github.com/bufbuild/connect-go)
| require | minor | `v1.7.0` -> `v1.8.0` |

---

### Release Notes

<details>
<summary>bufbuild/connect-go</summary>

###
[`v1.8.0`](https://github.com/bufbuild/connect-go/releases/tag/v1.8.0)

[Compare
Source](https://github.com/bufbuild/connect-go/compare/v1.7.0...v1.8.0)

#### What's Changed

##### Enhancements

- Expose HTTP method of unary requests (see
[documentation][http-method-docs]) by
[@&#8203;jhump](https://github.com/jhump) and
[@&#8203;akshayjshah](https://github.com/akshayjshah) in
[https://github.com/bufbuild/connect-go/pull/502](https://github.com/bufbuild/connect-go/pull/502)
and
[https://github.com/bufbuild/connect-go/pull/509](https://github.com/bufbuild/connect-go/pull/509)
- Implement `fmt.Stringer` interface for StreamType to improve debug
logging by [@&#8203;svrana](https://github.com/svrana) in
[https://github.com/bufbuild/connect-go/pull/495](https://github.com/bufbuild/connect-go/pull/495)

##### Bugfixes

- Fix documentation comments to use correct identifier name by
[@&#8203;cuishuang](https://github.com/cuishuang) in
[https://github.com/bufbuild/connect-go/pull/498](https://github.com/bufbuild/connect-go/pull/498)
- Fix Makefile quotes to handle paths with spaces by
[@&#8203;bufdev](https://github.com/bufdev) in
[https://github.com/bufbuild/connect-go/pull/508](https://github.com/bufbuild/connect-go/pull/508)
- Always close response body in `CloseRead` by
[@&#8203;pkwarren](https://github.com/pkwarren) in
[https://github.com/bufbuild/connect-go/pull/515](https://github.com/bufbuild/connect-go/pull/515)

#### New Contributors

- [@&#8203;cuishuang](https://github.com/cuishuang) made their first
contribution in
[https://github.com/bufbuild/connect-go/pull/498](https://github.com/bufbuild/connect-go/pull/498)
- [@&#8203;svrana](https://github.com/svrana) made their first
contribution in
[https://github.com/bufbuild/connect-go/pull/495](https://github.com/bufbuild/connect-go/pull/495)

**Full Changelog**:
bufbuild/connect-go@v1.7.0...v1.8.0

[http-method-docs]:
https://connect.build/docs/go/get-requests-and-caching#distinguishing-get-requests

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/open-feature/flagd).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMDIuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNS4xMDIuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
akshayjshah added a commit that referenced this pull request Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants