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

Consider making fmtBodyString function public #798

Open
jackcipher opened this issue Jun 23, 2024 · 2 comments
Open

Consider making fmtBodyString function public #798

jackcipher opened this issue Jun 23, 2024 · 2 comments

Comments

@jackcipher
Copy link

Hi,
I've been working with go-resty and found the fmtBodyString function in the Request struct to be particularly useful. However, I noticed that it's currently a private function. I believe making this function public could benefit other users of the library.

Current Situation:

The fmtBodyString function is currently private and not accessible to users of the library.

Proposal:

Consider making the fmtBodyString function public, allowing users to access it directly.

Benefits:

  1. Enhanced debugging capabilities: Users could leverage this function to inspect and format request bodies, which is particularly useful for debugging and logging purposes.
  2. Custom implementations: Users could build upon this function for custom formatting or processing of request bodies.
  3. Consistency: It would allow users to format body strings in the same way go-resty does internally, ensuring consistency across the application.

Source

func (r *Request) fmtBodyString(sl int64) (body string) {

@Arpit529Srivastava
Copy link

@jeevatkm i can fix this issue can you please assign it to me under the label hactoberfest or hactoberfest-accepted

@jeevatkm
Copy link
Member

jeevatkm commented Oct 4, 2024

@Arpit529Srivastava Thanks for showing your interest. However, this request is not straightforward. Still, I have yet to decide to expose it. It does bring dependency on maintaining the API contract if it is exposed. I need to think about it.

You could look at other open issues and let me know which one you can tackle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants