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

Proper Documentation on http::request and http::response #2214

Open
xhimanshuz opened this issue Apr 15, 2021 · 12 comments
Open

Proper Documentation on http::request and http::response #2214

xhimanshuz opened this issue Apr 15, 2021 · 12 comments
Assignees
Labels
Doc A documentation specific issue

Comments

@xhimanshuz
Copy link

xhimanshuz commented Apr 15, 2021

In boost Beast documentation nowhere mentioning how to properly create the Request and Response object.
Boost Beast Reference page is missing some basic things, So, I have to watch all your great talk to make me motivated to use Beast even if these are too great and knowledgeable, can't cover all the Beast features. I really like how fast you try to cover the content in a limited time.

As for reference, these are the reference page for the Response, Request class, and file_body class.
https://www.boost.org/doc/libs/1_68_0/libs/beast/doc/html/beast/ref/boost__beast__http__request.html
https://www.boost.org/doc/libs/1_68_0/libs/beast/doc/html/beast/ref/boost__beast__http__response.html
https://www.boost.org/doc/libs/1_68_0/libs/beast/doc/html/beast/ref/boost__beast__http__file_body.html

There should be some example at the end of all references, So People get to know how to use them.
I know it's time-consuming but please cover at least basic concepts So, New people like me at least know how to use basic functionality. I have read example Its great still haven't mentioned how to create request and response object.

@stale
Copy link

stale bot commented May 29, 2021

This issue has been open for a while with no activity, has it been resolved?

@stale stale bot added the Stale No recent activity label May 29, 2021
@xhimanshuz
Copy link
Author

No

@stale stale bot removed the Stale No recent activity label May 29, 2021
@vinniefalco
Copy link
Member

What's going on with this? @madmongo1

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been open for a while with no activity, has it been resolved?

@stale stale bot added the Stale No recent activity label Jan 9, 2022
@xhimanshuz
Copy link
Author

No

@madmongo1
Copy link
Collaborator

I am trying to think how I can best cover the needed information.
Do you think one example that covers the use of each method would be the right thing, or do you think a little example for each method would be better?

@madmongo1 madmongo1 added Doc A documentation specific issue and removed Stale No recent activity labels Jan 11, 2022
@xhimanshuz
Copy link
Author

So People get to know how to use them

@madmongo1 So, I mentioned, If you add an example at the end of the page of reference, It will be easy to learn and use.

@klemens-morgenstern
Copy link
Collaborator

A reference is not the place to learn, it's to be used by developers already familiar with the library. You shouldn't use the cppreference as an intro to C++ either. While I get that more examples are always better, the response & request objects are seldolmy used alone, and the doc has multiple examples of how to use them right here under Quick look : https://www.boost.org/doc/libs/1_80_0/libs/beast/doc/html/index.html

People might be thrown off by the reference being on the top of the ToC.

@NateSeymour
Copy link

@madmongo1 @ashtum Hey! I see that this issue has been stale for a while. Is there still interest in it? I'd be happy to write documentation on request and response.

@ashtum
Copy link
Collaborator

ashtum commented Oct 14, 2024

@madmongo1 @ashtum Hey! I see that this issue has been stale for a while. Is there still interest in it? I'd be happy to write documentation on request and response.

Yes, that sounds great. It might be helpful to share a draft of the documentation for initial feedback before investing too much time.

@NateSeymour
Copy link

@ashtum Sounds great, will do! Just for my reference, do you have any examples of boostorg documentation that you consider to be particularly well-written?

@ashtum
Copy link
Collaborator

ashtum commented Oct 16, 2024

The documentation needs to be consistent with the rest of the documentation in Beast.

There are already a few examples for request and response in Message Containers. You may want to expand on this by including examples with other body types. To do so, you will need to edit 02_message.qbk and add the necessary code snippets to http_snippets.cpp.

Alternatively, you can edit the Javadoc for each body type and add a concise example. You can find an example here:

@par Example
Disabling compression for a single message.
@code
ws.compress(false);
ws.write(net::buffer(s), ec);
ws.compress(true);
@endcode

The key is to keep it concise and clear; otherwise, most users will skip it without reading.

By the way, to build the documentation locally, you can follow the guides available here: https://github.com/boostorg/release-tools/tree/develop/build_docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doc A documentation specific issue
Projects
No open projects
Status: Triage
Development

No branches or pull requests

6 participants