You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Internal :
User post -https://fb.workplace.com/groups/thriftusers/permalink/1451667708875970/
Context: Hack Thrift Client throws away rpc headers received as part of the response from server. In c++, the common <rpc> method also throws away the headers but based on an annotation - GenerateDeprecatedHeaderClientMethods, an additional method header_<rpc> is generated that would return the headers along with response.
This diff :
- uses the annotation added in previous diff to generate `header_` methods.
- when present, the common `<rpc>` method would call `<header_rpc>` method and discard the header. This reduces the duplicate code between the two
- In addition `genAwaitResponse` is replaces with `genAwaitResponseWithHeaders`, so that we can change the `genAwaitResponse` to return headers and eventually remove `genAwaitResponseWithHeaders`.
- instead of discarding headers in `genAwaitResponse`, headers will be discarded in `<rpc>`.
Reviewed By: iahs
Differential Revision: D70428261
fbshipit-source-id: b566e5aa73d1ca6821f4ea1e612c51856b42b382
Copy file name to clipboardexpand all lines: third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/hack/gen-hack/FooBarBazService.php
Copy file name to clipboardexpand all lines: third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/hack/gen-hack/MyServicePrioChild.php
Copy file name to clipboardexpand all lines: third-party/thrift/src/thrift/compiler/test/fixtures/basic-annotations/out/hack/gen-hack/MyServicePrioParent.php
Copy file name to clipboardexpand all lines: third-party/thrift/src/thrift/compiler/test/fixtures/basic-structured-annotations/out/hack/gen-hack/MyService.php
0 commit comments