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

how to use the thrift to define the raw body? #1227

Closed
LF-DevJourney opened this issue Nov 11, 2024 · 1 comment
Closed

how to use the thrift to define the raw body? #1227

LF-DevJourney opened this issue Nov 11, 2024 · 1 comment
Labels
invalid issue invalid issue (not related to Hertz or described in document or not enough information provided) stale

Comments

@LF-DevJourney
Copy link

LF-DevJourney commented Nov 11, 2024

Suppose there is request like this. How can I define it in the hertz thrift file, and bind it to the request parameter.

curl -XPOST  -d '{"sing_record":[{"a":"b"},{"c":"d"}]}' '127.0.0.1:8887/x?id=1'

I use this:

struct SingRecord {
    1: map<string,string> sing_record
}

struct SingStatReq {
    1: string default_channelid
    2: list<SingRecord> sing_record

}

struct SingStatResp {

}

I cannot get the body parameter.

I also tried the (api.raw_query), but cannot find any example in the doc.

@github-actions github-actions bot added the invalid issue invalid issue (not related to Hertz or described in document or not enough information provided) label Nov 11, 2024
Copy link

This issue has been marked as invalid question, please give more information by following the issue template. The issue will be closed in 1 days if no further activity occurs.

@github-actions github-actions bot added the stale label Nov 11, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid issue invalid issue (not related to Hertz or described in document or not enough information provided) stale
Development

No branches or pull requests

1 participant