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

docs: add docs for new client #2991

Merged
merged 15 commits into from
May 13, 2024
Merged

docs: add docs for new client #2991

merged 15 commits into from
May 13, 2024

Conversation

efectn
Copy link
Member

@efectn efectn commented Apr 29, 2024

Description

This PR adds documentation for new client of Fiber v3.

To-Do List:

  • Request
  • Response
  • Client
    • Perhaps more information about the client. i.e when to use/when not to use
  • Hooks
  • Examples

Changes introduced

  • Documentation Update: Detail the updates made to the documentation and links to the changed files.

Type of change

  • Documentation update (changes to documentation)

Commit formatting

Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md

Summary by CodeRabbit

  • Documentation

    • Updated API documentation navigation order for better usability.
    • Introduced new client documentation detailing enhanced features like Cookiejar, request/response hooks, and improved HTTP client functionalities.
  • Refactor

    • Improved readability and consistency of method names and comments in code related to HTTP client operations.
  • Chores

    • Minor comment correction in the Response struct method definition for clarity.

@efectn efectn requested a review from a team as a code owner April 29, 2024 18:19
@efectn efectn requested review from gaby, sixcolors and ReneWerner87 and removed request for a team April 29, 2024 18:19
Copy link
Contributor

coderabbitai bot commented Apr 29, 2024

Walkthrough

The recent updates across various documentation files introduce significant enhancements to the Gofiber client library. These include new examples for authentication, TLS, and cookie management, detailed descriptions of request and response structures, and advanced functionalities such as hooks and extensive method additions for better request and response handling.

Changes

File Path Change Summary
docs/client/examples.md Added examples for basic authentication, TLS configuration, and cookie management.
docs/client/hooks.md Introduced request and response hooks with function signatures for customization.
docs/client/request.md Expanded Request structure with numerous methods for handling HTTP requests and data manipulation.
docs/client/response.md Detailed the Response structure including methods for handling responses and data formats.
docs/client/rest.md Enhanced Client struct with new methods for configuration, request/response handling, and marshaling.

🐰✨
In the burrows of code, where the data hops around,
A rabbit worked hard, with changes profound.
Hooks, requests, and clients galore,
In the library's heart, new features we store.
Hop along, developers, with joy let's proceed,
For in Gofiber's docs, you'll find all you need! 🌟
🐰✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.82%. Comparing base (109ccdd) to head (cfe5e80).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2991      +/-   ##
==========================================
- Coverage   82.85%   82.82%   -0.03%     
==========================================
  Files         115      115              
  Lines        8409     8409              
==========================================
- Hits         6967     6965       -2     
- Misses       1105     1106       +1     
- Partials      337      338       +1     
Flag Coverage Δ
unittests 82.82% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 28

Out of diff range and nitpick comments (15)
docs/whats_new.md (3)

Line range hint 9-9: Correct the contraction in the caution note.

- Its a draft, not finished yet.
+ It's a draft, not finished yet.

Line range hint 112-112: Correct the framework name to maintain consistency and accuracy.

- The route method is now like `ExpressJs` which gives you the option of a different notation and allows you to concatenate the route declaration.
+ The route method is now like `Express.js` which gives you the option of a different notation and allows you to concatenate the route declaration.

Line range hint 48-73: Ensure consistency in the use of list markers.

Convert asterisks to dashes for list items to maintain consistency with Markdown standards:

- * Listen -> unified with config
- * app.Config properties moved to listen config
+ - Listen -> unified with config
+ - app.Config properties moved to listen config
client/client.go (2)

120-120: Ensure consistent comment style for clarity.

The comment "SetJSONMarshal sets the JSON encoder." could be improved for consistency with other comments in the file, which typically start with a verb in the third person singular present tense, such as "Sets the JSON encoder."


577-577: Clarify the comment for the Reset method.

The comment "Reset clears the Client object" could be expanded to explain what specifically is being reset within the Client object. This would provide better clarity to the users of this method.

docs/client/client.md (1)

76-76: Clarify the sentence structure regarding the priority of Body, FormData, and File.

Consider rephrasing for clarity: "Note that 'Body' has the highest priority, followed by 'FormData', and then 'File'."

client/request.go (9)

124-124: Clarify the comment for better understanding.

The comment "this method will visit all field in the header" could be more descriptive. Consider rephrasing to "This method retrieves all values associated with the specified header key."


136-136: Ensure consistency in comment style.

The comment starts with "It will override header which has been set in client instance." Consider starting with a capital letter for consistency with other comments in the codebase: "It will override the header that has been set in the client instance."


150-150: Maintain consistency in terminology and phrasing.

The comment "It will override header which has been set in client instance." should be consistent with similar comments in the code. Suggest changing to "It will override the header previously set in the client instance."


175-175: Clarify and correct the comment.

The comment "It will override param which has been set in client instance." could be improved for clarity and grammatical accuracy. Suggest "It will override the parameter that has been set in the client instance."


188-188: Improve comment clarity and consistency.

The comment "It will override param which has been set in client instance." should be rephrased for better clarity and to match the style of other comments. Suggest "This method overrides any parameter previously set in the client instance."


195-195: Enhance comment accuracy and style.

The comment "It will override param which has been set in client instance." is repeated and lacks clarity. Consider revising to "This method overrides the parameter set in the client instance, if any."


215-215: Standardize comment format and improve clarity.

The comment "It will override user agent which has been set in client instance." should be corrected for better readability and consistency. Suggest "This method overrides the user agent previously set in the client instance."


324-324: Clarify the purpose of the method in the comment.

The comment for the SetJSON method could be more descriptive. Consider adding "This method sets the request body to the provided JSON object and specifies the body type as JSON."


331-331: Expand on the method's functionality in the comment.

The comment for the SetXML method is missing. It would be beneficial to add a comment similar to the SetJSON method, explaining that it sets the request body to the provided XML object and specifies the body type as XML.

docs/whats_new.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
@efectn efectn linked an issue Apr 29, 2024 that may be closed by this pull request
@efectn efectn marked this pull request as ready for review May 10, 2024 19:55
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Out of diff range and nitpick comments (19)
docs/client/examples.md (9)

39-39: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


67-67: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


113-113: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


139-139: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


175-175: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


208-208: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


169-169: Fenced code blocks should have a language specified.

Specify a language for the fenced code block to enable syntax highlighting and improve readability.


206-206: Fenced code blocks should have a language specified.

Specify a language for the fenced code block to enable syntax highlighting and improve readability.


178-178: Multiple consecutive blank lines.

Reduce multiple consecutive blank lines to a single blank line to maintain clean and professional documentation formatting.

docs/client/hooks.md (10)

72-72: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


119-119: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


170-170: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


221-221: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


255-255: Fenced code blocks should be surrounded by blank lines.

Add blank lines before and after the fenced code block to adhere to Markdown best practices.


64-64: Fenced code blocks should have a language specified.

Specify a language for the fenced code block to enable syntax highlighting and improve readability.


111-111: Fenced code blocks should have a language specified.

Specify a language for the fenced code block to enable syntax highlighting and improve readability.


154-154: Fenced code blocks should have a language specified.

Specify a language for the fenced code block to enable syntax highlighting and improve readability.


212-212: Fenced code blocks should have a language specified.

Specify a language for the fenced code block to enable syntax highlighting and improve readability.


252-252: Fenced code blocks should have a language specified.

Specify a language for the fenced code block to enable syntax highlighting and improve readability.

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between f4eac18 and 3085f70.
Files selected for processing (2)
  • docs/client/examples.md (1 hunks)
  • docs/client/hooks.md (1 hunks)

docs/client/examples.md Outdated Show resolved Hide resolved
docs/client/examples.md Outdated Show resolved Hide resolved
docs/client/examples.md Outdated Show resolved Hide resolved
docs/client/examples.md Outdated Show resolved Hide resolved
docs/client/hooks.md Outdated Show resolved Hide resolved
docs/client/hooks.md Outdated Show resolved Hide resolved
docs/client/hooks.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 24

Out of diff range and nitpick comments (3)
docs/whats_new.md (3)

Line range hint 9-9: Correct the contraction to improve grammatical accuracy.

- Its a draft, not finished yet.
+ It's a draft, not finished yet.

Line range hint 112-112: Correct the spelling of "Express.js" to maintain consistency with official terminology.

- The route method is now like `ExpressJs` which gives you the option of a different notation and allows you to concatenate the route declaration.
+ The route method is now like `Express.js` which gives you the option of a different notation and allows you to concatenate the route declaration.

Line range hint 195-203: Correct the spelling of "Express.js" in multiple instances to maintain consistency with official terminology.

- AutoFormat -> ExpressJs like
- Host -> ExpressJs like
- Port -> ExpressJs like
- IsProxyTrusted
- Reset
- Schema -> ExpressJs like
- SendStream -> ExpressJs like
- SendString -> ExpressJs like
- String -> ExpressJs like
- ViewBind -> instead of Bind
+ AutoFormat -> Express.js like
+ Host -> Express.js like
+ Port -> Express.js like
+ IsProxyTrusted
+ Reset
+ Schema -> Express.js like
+ SendStream -> Express.js like
+ SendString -> Express.js like
+ String -> Express.js like
+ ViewBind -> instead of Bind
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 3085f70 and 6220990.
Files selected for processing (4)
  • docs/client/client.md (1 hunks)
  • docs/client/request.md (1 hunks)
  • docs/client/response.md (1 hunks)
  • docs/whats_new.md (1 hunks)
Additional Context Used
LanguageTool (79)
docs/client/client.md (29)

Near line 271: Possible missing article found.
Context: ...adds one or more root certificates into client. ```go title="Signature" func (c *Clie...


Near line 295: Possible missing comma found.
Context: ...ig SetRetryConfig sets retry config in client which is impl by addon/retry package. ...


Near line 338: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 348: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level h...


Near line 358: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level h...


Near line 386: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 396: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 406: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 416: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 433: Possible missing article found.
Context: ... SetUserAgent SetUserAgent method sets userAgent field and its value in the client insta...


Near line 434: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level u...


Near line 444: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level r...


Near line 454: Possible missing article found.
Context: ...If the path param doesn't exist, return empty string. ```go title="Signature" func (...


Near line 463: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level p...


Near line 473: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 483: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 500: Possible missing preposition found.
Context: ...` ## Cookie Cookie returns the cookie be set in request instance. If cookie does...


Near line 510: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 520: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level c...


Near line 530: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 540: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 558: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 671: Possible missing article found.
Context: ...lient ## SetLogger SetLogger sets logger instance in client. go title="Signa...


Near line 720: Double-check that this verb is correct. Did you mean to use the past participle or the infinitive form here?
Context: ...nature" func Replace() ``` ## Get Get send a get request use defaultClient, a conv...


Near line 728: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ...) (*Response, error) ``` ## Post Post send a post request use defaultClient, a con...


Near line 736: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ...) (*Response, error) ``` ## Head Head send a head request use defaultClient, a con...


Near line 752: Possible missing preposition found.
Context: ...## Delete Delete send a delete request use defaultClient, a convenient method. ``...


Near line 760: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...e, error) ``` ## Options Options send a options request use defaultClient, a co...


Near line 768: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ...(*Response, error) ``` ## Patch Patch send a patch request use defaultClient, a co...

docs/client/request.md (28)

Near line 118: “its” (belonging to it) seems less likely than “it’s” (it is)
Context: ...Context Context returns the Context if its already set in request. Otherwise it re...


Near line 118: A comma may be missing after the conjunctive/linking adverb ‘Otherwise’.
Context: ... Context if its already set in request. Otherwise it returns context.Background(). ```...


Near line 126: Did you mean “interrupting”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ....Context for current Request. It allows to interrupt the request execution if ctx.Done() cha...


Near line 151: Possible missing article found.
Context: ... the request instance. It will override header which has been set in client instance. ...


Near line 151: Possible missing article found.
Context: ...l override header which has been set in client instance. ```go title="Signature" func...


Near line 168: Possible missing article found.
Context: ... the request instance. It will override header which has been set in client instance. ...


Near line 168: Possible missing article found.
Context: ...l override header which has been set in client instance. ```go title="Signature" func...


Near line 193: Possible missing comma found.
Context: ... the request instance. It will override param which has been set in client instance. ...


Near line 193: Possible missing article found.
Context: ...ll override param which has been set in client instance. ```go title="Signature" func...


Near line 210: Possible missing comma found.
Context: ... the request instance. It will override param which has been set in client instance. ...


Near line 210: Possible missing article found.
Context: ...ll override param which has been set in client instance. ```go title="Signature" func...


Near line 219: Possible missing comma found.
Context: ... the request instance. It will override param which has been set in client instance. ...


Near line 219: Possible missing article found.
Context: ...ll override param which has been set in client instance. ```go title="Signature" func...


Near line 244: Possible missing article found.
Context: ...erride user agent which has been set in client instance. ```go title="Signature" func...


Near line 285: Possible missing preposition found.
Context: ...` ## Cookie Cookie returns the cookie be set in request instance. If the cookie ...


Near line 294: Possible missing article found.
Context: ... the request instance. It will override cookie which set in client instance. ```go ti...


Near line 303: Possible missing article found.
Context: ... the request instance. It will override cookie which set in client instance. ```go ti...


Near line 312: Possible missing article found.
Context: ... the request instance. It will override cookie which set in client instance. ```go ti...


Near line 328: Possible missing preposition found.
Context: ...Param PathParam returns the path param be set in request instance. If the path pa...


Near line 328: Possible missing article found.
Context: ...If the path param doesn't exist, return empty string. ```go title="Signature" func (...


Near line 395: Possible missing article found.
Context: ... ## SetRawBody SetRawBody method sets body with raw data in request. ```go title=...


Near line 484: Possible missing article found.
Context: ...le ``` ## AddFile AddFile method adds single file field and its value in the request...


Near line 492: Possible missing article found.
Context: ...thReader AddFileWithReader method adds single field and its value in the request inst...


Near line 525: Possible missing article found.
Context: ...ects returns the max redirects count in request. ```go title="Signature" func (r *Requ...


Near line 631: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...er Header is a wrapper which wrap http.Header, the header in client and request will ...


Near line 923: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...`` ## AcquireFile AcquireFile returns an File object from the pool. And you can ...


Near line 936: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...e pool. Do not access the released File object, otherwise data races may occur. ```go title="Sig...


Near line 968: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...SetReader SetReader method can receive a io.ReadCloser which will be closed in p...

docs/client/response.md (4)

Near line 43: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...ol. Do not access the released Response object, otherwise, data races may occur. ```go title="Sig...


Near line 90: Possible missing article found.
Context: ...kies() []*fasthttp.Cookie ``` ## Body Body method returns HTTP response as []byte ...


Near line 139: Consider adding a comma here.
Context: ...ct and Response object, after call Close please don't use these object. ```go title="S...


Near line 139: The plural determiner ‘these’ does not agree with the singular noun ‘object’.
Context: ...ject, after call Close please don't use these object. ```go title="Signature" func (r *Resp...

docs/whats_new.md (18)

Near line 9: “its” (belonging to it) seems less likely than “it’s” (it is)
Context: ...c_max_heading_level: 4 --- :::caution Its a draft, not finished yet. ::: [//]: ...


Near line 49: It looks like there is a word missing here. Did you mean “listen to config”?
Context: ...config * app.Config properties moved to listen config * DisableStartupMessage * EnablePre...


Near line 53: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...nablePrintRoutes * ListenerNetwork -> previously Network ### new methods * RegisterCus...


Near line 64: Possible missing preposition found.
Context: ...ods * Mount -> Use app.Use() instead * ListenTLS -> Use app.Listen() with tls.Config * L...


Near line 112: The official spelling of this programming framework is “Express.js”.
Context: ... chaining The route method is now like ExpressJs which gives you the option of a differ...


Near line 144: Unpaired symbol: ‘[’ seems to be missing
Context: ...ms("id")}) }) }) ```

Here you can find more info...


Near line 195: The official spelling of this programming framework is “Express.js”.
Context: ... ::: ### new methods * AutoFormat -> ExpressJs like * Host -> ExpressJs like * Port ->...


Near line 196: The official spelling of this programming framework is “Express.js”.
Context: ... AutoFormat -> ExpressJs like * Host -> ExpressJs like * Port -> ExpressJs like * IsProxy...


Near line 197: The official spelling of this programming framework is “Express.js”.
Context: ...like * Host -> ExpressJs like * Port -> ExpressJs like * IsProxyTrusted * Reset * Schema ...


Near line 200: The official spelling of this programming framework is “Express.js”.
Context: ...ke * IsProxyTrusted * Reset * Schema -> ExpressJs like * SendStream -> ExpressJs like * S...


Near line 201: The official spelling of this programming framework is “Express.js”.
Context: ...chema -> ExpressJs like * SendStream -> ExpressJs like * SendString -> ExpressJs like * S...


Near line 202: The official spelling of this programming framework is “Express.js”.
Context: ...tream -> ExpressJs like * SendString -> ExpressJs like * String -> ExpressJs like * ViewB...


Near line 203: The official spelling of this programming framework is “Express.js”.
Context: ...endString -> ExpressJs like * String -> ExpressJs like * ViewBind -> instead of Bind ###...


Near line 256: Consider rephrasing this to strengthen your wording.
Context: ...) ## Updates to CORS Middleware We've made some changes to the CORS middleware to improve its f...


Near line 264: Loose punctuation mark.
Context: ...updated fields: - Config.AllowOrigins: Now accepts a slice of strings, each re...


Near line 265: Loose punctuation mark.
Context: ... allowed origin. - Config.AllowMethods: Now accepts a slice of strings, each re...


Near line 266: Loose punctuation mark.
Context: ... allowed method. - Config.AllowHeaders: Now accepts a slice of strings, each re...


Near line 267: Loose punctuation mark.
Context: ...allowed header. - Config.ExposeHeaders: Now accepts a slice of strings, each re...

Additional comments not posted (2)
docs/whats_new.md (1)

230-231: Ensure the description of the new client package is clear and grammatically correct.

docs/client/client.md (1)

22-45: The example code uses hard tabs. The project's style guide should be checked to ensure consistency with the indentation style used across other documentation and code examples.

Comment on lines 9 to 11
# Client

The Fiber Client is a powerful HTTP client optimized for high performance and ease of use in server-side applications. Built on top of the robust FastHTTP library, it inherits FastHTTP's high-speed HTTP protocol implementation. The client is designed to make HTTP requests both internally within services or externally to other web services.
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The introduction of the client.md documentation does not specify the version of the Fiber library, particularly "Fiber v3", as expected. It is recommended to update the documentation to clearly mention the applicable version to avoid confusion, especially for users transitioning between different versions.

  • Update the introduction in docs/client/client.md to include "Fiber v3".
Analysis chain

Ensure the introduction clearly specifies the version of Fiber this documentation applies to, especially since it mentions "new client of Fiber v3".

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the version is mentioned in the introduction of the client documentation.

# Test: Search for the version mention in the introduction. Expect: Mention of "Fiber v3".
rg --type md "^The Fiber Client" docs/client/client.md

Length of output: 398

## AddHeaders

AddHeaders method adds multiple headers field and its values at one go in the client instance.
These headers will be applied to all requests raised from this client instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comma after "instance" for consistency with similar sentences in the document.

- These headers will be applied to all requests raised from this client instance.  Also it can be overridden at request level headers options.
+ These headers will be applied to all requests raised from this client instance. Also, it can be overridden at request level headers options.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
These headers will be applied to all requests raised from this client instance.
These headers will be applied to all requests raised from this client instance. Also, it can be overridden at request level headers options.

@ReneWerner87
Copy link
Member

@efectn
image
double client as point only confuses
we have to rename the first child point

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 25

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 6220990 and e2f60ac.
Files selected for processing (5)
  • docs/client/client.md (1 hunks)
  • docs/client/examples.md (1 hunks)
  • docs/client/hooks.md (1 hunks)
  • docs/client/request.md (1 hunks)
  • docs/client/response.md (1 hunks)

docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved

### Head

Head send a head request use defaultClient, a convenient method.
Copy link
Contributor

Choose a reason for hiding this comment

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

Correct the verb form to maintain consistency and grammatical correctness.

- Head send a head request use defaultClient, a convenient method.
+ Head sends a head request using the defaultClient, a convenient method.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Head send a head request use defaultClient, a convenient method.
Head sends a head request using the defaultClient, a convenient method.

docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/hooks.md Show resolved Hide resolved
@ReneWerner87
Copy link
Member

@efectn image double client as point only confuses we have to rename the first child point

image

Copy link
Member

@ReneWerner87 ReneWerner87 left a comment

Choose a reason for hiding this comment

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

can you take a look at the comments and, if necessary, adopt the AI language improvements

looks very good

docs/client/examples.md Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/rest.md Outdated Show resolved Hide resolved
docs/client/response.md Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 23

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between e2f60ac and a245aa9.
Files ignored due to path filters (1)
  • docs/client/_category_.json is excluded by !**/*.json
Files selected for processing (3)
  • docs/client/request.md (1 hunks)
  • docs/client/response.md (1 hunks)
  • docs/client/rest.md (1 hunks)
Additional Context Used
LanguageTool (61)
docs/client/request.md (30)

Near line 116: “its” (belonging to it) seems less likely than “it’s” (it is)
Context: ...Context Context returns the Context if its already set in request. Otherwise it re...


Near line 116: A comma may be missing after the conjunctive/linking adverb ‘Otherwise’.
Context: ... Context if its already set in request. Otherwise it returns context.Background(). ```...


Near line 124: Did you mean “interrupting”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ....Context for current Request. It allows to interrupt the request execution if ctx.Done() cha...


Near line 149: Possible missing article found.
Context: ... the request instance. It will override header which has been set in client instance. ...


Near line 149: Possible missing article found.
Context: ...l override header which has been set in client instance. ```go title="Signature" func...


Near line 166: Possible missing article found.
Context: ... the request instance. It will override header which has been set in client instance. ...


Near line 166: Possible missing article found.
Context: ...l override header which has been set in client instance. ```go title="Signature" func...


Near line 191: Possible missing comma found.
Context: ... the request instance. It will override param which has been set in client instance. ...


Near line 191: Possible missing article found.
Context: ...ll override param which has been set in client instance. ```go title="Signature" func...


Near line 208: Possible missing comma found.
Context: ... the request instance. It will override param which has been set in client instance. ...


Near line 208: Possible missing article found.
Context: ...ll override param which has been set in client instance. ```go title="Signature" func...


Near line 217: Possible missing comma found.
Context: ... the request instance. It will override param which has been set in client instance. ...


Near line 217: Possible missing article found.
Context: ...ll override param which has been set in client instance. ```go title="Signature" func...


Near line 242: Possible missing article found.
Context: ...erride user agent which has been set in client instance. ```go title="Signature" func...


Near line 283: Possible missing preposition found.
Context: ...` ## Cookie Cookie returns the cookie be set in request instance. If the cookie ...


Near line 292: Possible missing article found.
Context: ... the request instance. It will override cookie which set in client instance. ```go ti...


Near line 301: Possible missing article found.
Context: ... the request instance. It will override cookie which set in client instance. ```go ti...


Near line 310: Possible missing article found.
Context: ... the request instance. It will override cookie which set in client instance. ```go ti...


Near line 326: Possible missing preposition found.
Context: ...Param PathParam returns the path param be set in request instance. If the path pa...


Near line 326: Possible missing article found.
Context: ...If the path param doesn't exist, return empty string. ```go title="Signature" func (...


Near line 482: Possible missing article found.
Context: ...le ``` ## AddFile AddFile method adds single file field and its value in the request...


Near line 490: Possible missing article found.
Context: ...thReader AddFileWithReader method adds single field and its value in the request inst...


Near line 514: Possible missing article found.
Context: ... ## SetTimeout SetTimeout method sets timeout field and its values at one go in the r...


Near line 523: Possible missing article found.
Context: ...ects returns the max redirects count in request. ```go title="Signature" func (r *Requ...


Near line 532: Possible missing comma found.
Context: ... request instance. It will override max redirect which set in client instance. ```go ti...


Near line 629: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...er Header is a wrapper which wrap http.Header, the header in client and request will ...


Near line 770: Possible missing preposition found.
Context: ...() # PathParam PathParam is a map which to store path params. go type PathP...


Near line 921: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...`` ## AcquireFile AcquireFile returns an File object from the pool. And you can ...


Near line 934: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...e pool. Do not access the released File object, otherwise data races may occur. ```go title="Sig...


Near line 966: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...SetReader SetReader method can receive a io.ReadCloser which will be closed in p...

docs/client/response.md (4)

Near line 41: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...ol. Do not access the released Response object, otherwise, data races may occur. ```go title="Sig...


Near line 96: Possible missing article found.
Context: ...Response) Body() []byte ``` ## String String method returns the body of the server r...


Near line 137: Consider adding a comma here.
Context: ...ct and Response object, after call Close please don't use these object. ```go title="S...


Near line 137: The plural determiner ‘these’ does not agree with the singular noun ‘object’.
Context: ...ject, after call Close please don't use these object. ```go title="Signature" func (r *Resp...

docs/client/rest.md (27)

Near line 269: Possible missing article found.
Context: ...adds one or more root certificates into client. ```go title="Signature" func (c *Clie...


Near line 293: Possible missing comma found.
Context: ...ig SetRetryConfig sets retry config in client which is impl by addon/retry package. ...


Near line 336: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 346: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level h...


Near line 356: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level h...


Near line 384: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 394: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 404: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 414: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 431: Possible missing article found.
Context: ... SetUserAgent SetUserAgent method sets userAgent field and its value in the client insta...


Near line 432: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level u...


Near line 442: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level r...


Near line 452: Possible missing article found.
Context: ...If the path param doesn't exist, return empty string. ```go title="Signature" func (...


Near line 461: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level p...


Near line 471: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 481: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 498: Possible missing preposition found.
Context: ...` ## Cookie Cookie returns the cookie be set in request instance. If cookie does...


Near line 508: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 528: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 538: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 556: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 669: Possible missing article found.
Context: ...lient ## SetLogger SetLogger sets logger instance in client. go title="Signa...


Near line 718: Double-check that this verb is correct. Did you mean to use the past participle or the infinitive form here?
Context: ...ature" func Replace() ``` ### Get Get send a get request use defaultClient, a conv...


Near line 726: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ... (*Response, error) ``` ### Post Post send a post request use defaultClient, a con...


Near line 734: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ... (*Response, error) ``` ### Head Head send a head request use defaultClient, a con...


Near line 758: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ..., error) ``` ### Options Options send a options request use defaultClient, a co...


Near line 766: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ...*Response, error) ``` ### Patch Patch send a patch request use defaultClient, a co...

docs/client/response.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 21

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between a245aa9 and 59d782c.
Files selected for processing (3)
  • docs/client/request.md (1 hunks)
  • docs/client/response.md (1 hunks)
  • docs/client/rest.md (1 hunks)
Additional Context Used
LanguageTool (39)
docs/client/request.md (13)

Near line 288: Possible missing article found.
Context: ...l override param, which has been set in client instance. ```go title="Signature" func...


Near line 305: Possible missing article found.
Context: ...l override param, which has been set in client instance. ```go title="Signature" func...


Near line 314: Possible missing article found.
Context: ...l override param, which has been set in client instance. ```go title="Signature" func...


Near line 378: Possible missing article found.
Context: ...erride user agent which has been set in client instance. ```go title="Signature" func...


Near line 491: Possible missing article found.
Context: ...If the path param doesn't exist, return empty string. ```go title="Signature" func (...


Near line 580: Possible missing article found.
Context: ... ## SetRawBody SetRawBody method sets body with raw data in request. ```go title=...


Near line 1000: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...er Header is a wrapper which wrap http.Header, the header in client and request will ...


Near line 1141: Possible missing preposition found.
Context: ...() # PathParam PathParam is a map which to store path params. go type PathP...


Near line 1292: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...`` ## AcquireFile AcquireFile returns an File object from the pool. And you can ...


Near line 1293: Possible missing article found.
Context: ...e object from the pool. And you can set field in the File with SetFileFunc. The retu...


Near line 1305: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...e pool. Do not access the released File object, otherwise data races may occur. ```go title="Sig...


Near line 1337: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...SetReader SetReader method can receive a io.ReadCloser which will be closed in p...


Near line 1337: Possible missing comma found.
Context: ...ader SetReader method can receive a io.ReadCloser which will be closed in parserBody hook...

docs/client/response.md (3)

Near line 125: Possible missing article found.
Context: ...`` go => fiber ```

## Body Body method returns HTTP response as []byte ...


Near line 205: Consider adding a comma here.
Context: ...ct and Response object, after call Close please don't use these object. ```go title="S...


Near line 205: The plural determiner ‘these’ does not agree with the singular noun ‘object’.
Context: ...ject, after call Close please don't use these object. ```go title="Signature" func (r *Resp...

docs/client/rest.md (23)

Near line 359: Possible missing comma found.
Context: ...ig SetRetryConfig sets retry config in client which is impl by addon/retry package. ...


Near line 425: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 435: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level h...


Near line 445: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level h...


Near line 473: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 483: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 493: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 503: Possible missing comma found.
Context: ...ests raised from this client instance. Also it can be overridden at request level p...


Near line 520: Possible missing article found.
Context: ... SetUserAgent SetUserAgent method sets userAgent field and its value in the client insta...


Near line 521: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level u...


Near line 531: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level r...


Near line 550: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level p...


Near line 587: Possible missing preposition found.
Context: ...` ## Cookie Cookie returns the cookie be set in request instance. If cookie does...


Near line 588: Possible missing article found.
Context: ...stance. If cookie doesn't exist, return empty string. ```go title="Signature" func (...


Near line 597: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 641: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 651: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...uests raised from this client instance. Also it can be overridden at request level c...


Near line 669: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...uests raised from this client instance. Also, it can be overridden at request level ...


Near line 767: Double-check that this verb is correct. Did you mean to use the past participle or the infinitive form here?
Context: ...nature" func Replace() ``` ## Get Get send a get request use defaultClient, a conv...


Near line 775: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ...) (*Response, error) ``` ## Post Post send a post request use defaultClient, a con...


Near line 783: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ...) (*Response, error) ``` ## Head Head send a head request use defaultClient, a con...


Near line 807: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...e, error) ``` ## Options Options send a options request use defaultClient, a co...


Near line 815: There seems to be a noun/verb agreement error. Did you mean “sends” or “sent”?
Context: ...(*Response, error) ``` ## Patch Patch send a patch request use defaultClient, a co...

docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/response.md Show resolved Hide resolved
docs/client/response.md Show resolved Hide resolved
docs/client/response.md Show resolved Hide resolved
docs/client/response.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/client.md Outdated Show resolved Hide resolved
docs/client/examples.md Outdated Show resolved Hide resolved
Co-authored-by: Jason McNeil <sixcolors@mac.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 59d782c and 918c669.
Files selected for processing (1)
  • docs/client/examples.md (1 hunks)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 918c669 and dc7d3d9.
Files selected for processing (1)
  • docs/client/examples.md (1 hunks)

docs/client/examples.md Outdated Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Outdated Show resolved Hide resolved
docs/client/examples.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Out of diff range and nitpick comments (2)
docs/client/request.md (2)

134-134: Ensure fenced code blocks are surrounded by blank lines for proper Markdown formatting.

Add blank lines around the code block for better readability and to adhere to Markdown best practices.


165-165: Specify the language for code blocks to enable syntax highlighting.

Add json as the language identifier to the code block to improve readability and syntax highlighting.

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between dc7d3d9 and 92efa57.
Files selected for processing (4)
  • docs/client/examples.md (1 hunks)
  • docs/client/request.md (1 hunks)
  • docs/client/response.md (1 hunks)
  • docs/client/rest.md (1 hunks)
Files not reviewed due to errors (2)
  • docs/client/response.md (no review received)
  • docs/client/rest.md (no review received)

docs/client/request.md Outdated Show resolved Hide resolved
docs/client/request.md Outdated Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
@ReneWerner87 ReneWerner87 added this to the v3 milestone May 13, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 17

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 92efa57 and 1e44b9c.
Files selected for processing (5)
  • docs/client/examples.md (1 hunks)
  • docs/client/hooks.md (1 hunks)
  • docs/client/request.md (1 hunks)
  • docs/client/response.md (1 hunks)
  • docs/client/rest.md (1 hunks)
Files not reviewed due to errors (2)
  • docs/client/response.md (no review received)
  • docs/client/hooks.md (no review received)

docs/client/request.md Show resolved Hide resolved
docs/client/request.md Show resolved Hide resolved
docs/client/request.md Show resolved Hide resolved
docs/client/request.md Show resolved Hide resolved
docs/client/rest.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
docs/client/examples.md Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Out of diff range and nitpick comments (4)
docs/client/hooks.md (1)

17-17: Consider varying the sentence structure to enhance readability.

You might consider rephrasing to avoid repetitive sentence beginnings. For example, "To create request hooks, use the RequestHook func(*Client, *Request) error function signature. These hooks can modify the host URL, log request properties, etc."

docs/whats_new.md (3)

Line range hint 9-9: Correct the contraction for clarity and grammatical accuracy.

- Its a draft, not finished yet.
+ It's a draft, not finished yet.

Line range hint 191-199: Use the official spelling of "Express.js" for consistency.

- * AutoFormat -> ExpressJs like
- * Host -> ExpressJs like
- * Port -> ExpressJs like
- * IsProxyTrusted
- * Reset
- * Schema -> ExpressJs like
- * SendStream -> ExpressJs like
- * SendString -> ExpressJs like
- * String -> ExpressJs like
- * ViewBind -> instead of Bind
+ * AutoFormat -> Express.js like
+ * Host -> Express.js like
+ * Port -> Express.js like
+ * IsProxyTrusted
+ * Reset
+ * Schema -> Express.js like
+ * SendStream -> Express.js like
+ * SendString -> Express.js like
+ * String -> Express.js like
+ * ViewBind -> instead of Bind

Line range hint 49-74: Use dashes instead of asterisks for list items to maintain consistency.

- * Listen -> unified with config
- * app.Config properties moved to listen config
- * DisableStartupMessage
- * EnablePrefork -> previously Prefork
- * EnablePrintRoutes
- * ListenerNetwork -> previously Network
+ - Listen -> unified with config
+ - app.Config properties moved to listen config
+ - DisableStartupMessage
+ - EnablePrefork -> previously Prefork
+ - EnablePrintRoutes
+ - ListenerNetwork -> previously Network
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 1e44b9c and cfe5e80.
Files selected for processing (2)
  • docs/client/hooks.md (1 hunks)
  • docs/whats_new.md (1 hunks)
Additional Context Used
LanguageTool (25)
docs/client/hooks.md (9)

Near line 17: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ion signature while creating the hooks. You can use request hooks to change host UR...


Near line 76: Possible missing preposition found.
Context: ...ere are also some builtin request hooks provide some functionalities for Fiber client. ...


Near line 78: Unpaired symbol: ‘[’ seems to be missing
Context: ... is a list of them: - [parserRequestURL](https://github.com/gofiber/fiber/blob/m...


Near line 80: Unpaired symbol: ‘[’ seems to be missing
Context: ...yParam` methods. - [parserRequestHeader](https://github.com/gofiber/fiber/blob/m...


Near line 82: Unpaired symbol: ‘[’ seems to be missing
Context: ...ethods functional. - [parserRequestBody](https://github.com/gofiber/fiber/blob/m...


Near line 128: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ion signature while creating the hooks. You can use response hook for logging, trac...


Near line 176: Possible missing preposition found.
Context: ...ere are also some builtin request hooks provide some functionalities for Fiber client. ...


Near line 178: Unpaired symbol: ‘[’ seems to be missing
Context: ...a list of them: - [parserResponseCookie](https://github.com/gofiber/fiber/blob/m...


Near line 180: Unpaired symbol: ‘[’ seems to be missing
Context: ...and cookiejar if it's exists. - [logger](https://github.com/gofiber/fiber/blob/m...

docs/whats_new.md (16)

Near line 9: “its” (belonging to it) seems less likely than “it’s” (it is)
Context: ...c_max_heading_level: 3 --- :::caution Its a draft, not finished yet. ::: [//]: ...


Near line 50: It looks like there is a word missing here. Did you mean “listen to config”?
Context: ...config * app.Config properties moved to listen config * DisableStartupMessage * EnablePre...


Near line 54: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...nablePrintRoutes * ListenerNetwork -> previously Network ### new methods * RegisterCus...


Near line 145: Unpaired symbol: ‘[’ seems to be missing
Context: ...ms("id")}) }) }) ```

Here you can find more info...


Near line 191: The official spelling of this programming framework is “Express.js”.
Context: ... ::: ### new methods * AutoFormat -> ExpressJs like * Host -> ExpressJs like * Port ->...


Near line 192: The official spelling of this programming framework is “Express.js”.
Context: ... AutoFormat -> ExpressJs like * Host -> ExpressJs like * Port -> ExpressJs like * IsProxy...


Near line 193: The official spelling of this programming framework is “Express.js”.
Context: ...like * Host -> ExpressJs like * Port -> ExpressJs like * IsProxyTrusted * Reset * Schema ...


Near line 196: The official spelling of this programming framework is “Express.js”.
Context: ...ke * IsProxyTrusted * Reset * Schema -> ExpressJs like * SendStream -> ExpressJs like * S...


Near line 197: The official spelling of this programming framework is “Express.js”.
Context: ...chema -> ExpressJs like * SendStream -> ExpressJs like * SendString -> ExpressJs like * S...


Near line 198: The official spelling of this programming framework is “Express.js”.
Context: ...tream -> ExpressJs like * SendString -> ExpressJs like * String -> ExpressJs like * ViewB...


Near line 199: The official spelling of this programming framework is “Express.js”.
Context: ...endString -> ExpressJs like * String -> ExpressJs like * ViewBind -> instead of Bind ###...


Near line 252: Consider rephrasing this to strengthen your wording.
Context: ...::: ## 🧬 Middlewares ### CORS We've made some changes to the CORS middleware to improve its f...


Near line 260: Loose punctuation mark.
Context: ...updated fields: - Config.AllowOrigins: Now accepts a slice of strings, each re...


Near line 261: Loose punctuation mark.
Context: ... allowed origin. - Config.AllowMethods: Now accepts a slice of strings, each re...


Near line 262: Loose punctuation mark.
Context: ... allowed method. - Config.AllowHeaders: Now accepts a slice of strings, each re...


Near line 263: Loose punctuation mark.
Context: ...allowed header. - Config.ExposeHeaders: Now accepts a slice of strings, each re...

Additional comments not posted (1)
docs/client/hooks.md (1)

21-58: Replace hard tabs with spaces in the code snippet for consistency and readability.


</details>

There are also some builtin request hooks provide some functionalities for Fiber client. Here is a list of them:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a preposition for grammatical correctness.

- There are also some builtin request hooks provide some functionalities for Fiber client.
+ There are also some builtin request hooks that provide some functionalities for the Fiber client.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
There are also some builtin request hooks provide some functionalities for Fiber client. Here is a list of them:
There are also some builtin request hooks that provide some functionalities for the Fiber client.

Comment on lines +78 to +82
- [parserRequestURL](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L62): parserRequestURL customizes the URL according to the path params and query params. It's necessary for `PathParam` and `QueryParam` methods.

- [parserRequestHeader](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L113): parserRequestHeader sets request headers, cookies, body type, referer, user agent according to client and request proeprties. It's necessary to make request header and cookiejar methods functional.

- [parserRequestBody](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L178): parserRequestBody serializes the body automatically. It is useful for XML, JSON, form, file bodies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure all markdown links are correctly formatted.

- - [parserRequestURL](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L62): parserRequestURL customizes the URL according to the path params and query params. It's necessary for `PathParam` and `QueryParam` methods.
- - [parserRequestHeader](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L113): parserRequestHeader sets request headers, cookies, body type, referer, user agent according to client and request proeprties. It's necessary to make request header and cookiejar methods functional.
- - [parserRequestBody](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L178): parserRequestBody serializes the body automatically. It is useful for XML, JSON, form, file bodies.
+ - [parserRequestURL](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L62): parserRequestURL customizes the URL according to the path params and query params. It's necessary for `PathParam` and `QueryParam` methods.
+ - [parserRequestHeader](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L113): parserRequestHeader sets request headers, cookies, body type, referer, user agent according to client and request properties. It's necessary to make request header and cookiejar methods functional.
+ - [parserRequestBody](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L178): parserRequestBody serializes the body automatically. It is useful for XML, JSON, form, file bodies.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- [parserRequestURL](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L62): parserRequestURL customizes the URL according to the path params and query params. It's necessary for `PathParam` and `QueryParam` methods.
- [parserRequestHeader](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L113): parserRequestHeader sets request headers, cookies, body type, referer, user agent according to client and request proeprties. It's necessary to make request header and cookiejar methods functional.
- [parserRequestBody](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L178): parserRequestBody serializes the body automatically. It is useful for XML, JSON, form, file bodies.
- [parserRequestURL](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L62): parserRequestURL customizes the URL according to the path params and query params. It's necessary for `PathParam` and `QueryParam` methods.
- [parserRequestHeader](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L113): parserRequestHeader sets request headers, cookies, body type, referer, user agent according to client and request properties. It's necessary to make request header and cookiejar methods functional.
- [parserRequestBody](https://github.com/gofiber/fiber/blob/main/client/hooks.go#L178): parserRequestBody serializes the body automatically. It is useful for XML, JSON, form, file bodies.

@ReneWerner87 ReneWerner87 merged commit 3ba90c0 into main May 13, 2024
14 of 15 checks passed
@efectn efectn deleted the v3-client-docs branch May 22, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Update Documentation and README.md for Client Package Refactor
3 participants