[cpp rest-sdk] Response headers handler#1511
[cpp rest-sdk] Response headers handler#1511etherealjoy merged 4 commits intoOpenAPITools:masterfrom
Conversation
|
What about error status? no need for headers there? |
|
@etherealjoy If I understand your question(s), with the status code is not enough to get all the information some APIs send. As an example, the one I am using send information about remaining requests in the headers. |
|
@whoan
What I meant here if you want to invoke header handler callback when a 400 is received for example. |
|
@ethanjcohen Yes, I compiled the code. Before the last commit I hadn't done, but now I did and it is working fine. Regarding the status code, changing the handler signature to receive it would be a good improvement indeed. Do you want me to do it in this PR? |
|
@whoan |
|
@whoan thanks for the PR, which has been included in the v3.3.4 release: https://twitter.com/oas_generator/status/1068772409795207168 |
* Add support to set a Response headers handler * Update PetStore * Fix missing names * Update PetStore
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.master,3.4.x,4.0.x. Default:master.Description of the PR
Support processing the HTTP response headers through a handler that can be set in the
ApiClientclass.Some APIs (like this) return useful information in the response headers, so this PR is to support processing them.
Ping @ravinikam @stkrwork @fvarose @etherealjoy @MartinDelille