Skip to content

Releases: opus-domini/fast-shot

v1.1.4

27 Nov 04:32
6940ceb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.1.3...v1.1.4

v1.1.3

17 Nov 03:31
ee7ded2
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.2...v1.1.3

v1.1.2

28 Jul 18:06
14a2d63
Compare
Choose a tag to compare

What's Changed

  • Improve the docs.

Full Changelog: v1.1.1...v1.1.2

v1.1.1

28 Jul 05:11
1d43dde
Compare
Choose a tag to compare

What's Changed

  • Add an example section!
  • Improve the docs.

Full Changelog: v1.1.0...v1.1.1

v1.1.0

26 Jul 19:32
dff68f3
Compare
Choose a tag to compare

Fast Shot v1.1.0 Release Notes

Release

We're excited to announce the release of Fast Shot v1.1.0, which introduces a major shift towards a more intuitive and fluent API for handling HTTP responses. This release focuses on providing a smoother developer experience and more readable code when working with responses in your Go applications.

New Features

Fluent Response API

Say goodbye to tedious response handling! Fast Shot v1.1.0 brings a brand new fluent API that streamlines working with response data:

  • Chainable Methods: Easily access status codes, headers, cookies, and the request object through a series of intuitive method calls.
  • Simplified Data Extraction: Extract response body content as bytes, strings, or JSON objects with dedicated methods.
  • Enhanced Readability: Write cleaner and more expressive code when processing HTTP responses.

Example Usage:

resp, err := client.GET("/users").Send()
if err != nil {
  // Handle error
}

// Accessing response data
statusCode := resp.Status().Code()
contentType := resp.Header().Get("Content-Type")
body, _ := resp.Body().AsString()

// Working with JSON responses
var users []User
err = resp.Body().AsJSON(&users)
if err != nil {
  // Handle error
}

Improvements

  • Semantic Code: The codebase has undergone a significant refactor to improve code clarity and maintainability, adopting more meaningful names and structure.
  • Comprehensive Test Coverage: The test suite has been expanded to cover a wider range of scenarios, increasing confidence in the library's robustness.
  • Enhanced Documentation: The documentation has been updated to reflect the new API and provide more comprehensive examples.

Breaking Changes

  • Response Handling Overhaul: The way responses are handled has been completely redesigned. You will need to update your code to use the new fluent API methods. Refer to the documentation and examples for guidance on migrating your existing code.

🤝 We highly encourage upgrading to Fast Shot v1.1.0 to experience the power and elegance of the fluent response API. Your feedback and contributions are always welcome as we continue to evolve Fast Shot!

Full Changelog: v1.0.1...v1.1.0

v1.0.1

23 Jul 21:44
b64b966
Compare
Choose a tag to compare

Fast Shot v1.0.1 Release Notes

What's Changed

New Contributors

Full Changelog: v1.0.0...v1.0.1


🤝 We strongly recommend updating to this latest version to take advantage of these new capabilities. As always, we appreciate your feedback and contributions to make Fast Shot even better.

v1.0.0

24 Jun 03:12
Compare
Choose a tag to compare

Fast Shot v1.0.0 Release Notes

Release

We are thrilled to announce the release of Fast Shot v1.0.0, which includes significant enhancements to our retry mechanism and introduces a new custom HTTP client feature. These additions make Fast Shot even more flexible and powerful for your Go HTTP client needs.

New Features

Advanced Retry Mechanism

Our retry mechanism has been completely revamped to provide more control and flexibility:

  • Customizable Backoff Strategies:
    • Constant backoff
    • Exponential backoff
    • Full jitter support for both constant and exponential backoff
  • Flexible Retry Conditions: Define your own conditions for when a request should be retried
  • Maximum Delay Setting: Set an upper limit on the delay between retries

Example usage:

client.POST("/resource").
    Retry().
    SetExponentialBackoff(time.Second, 5, 2.0).
    Send()

Custom HTTP Client

This feature allows you to inject custom HTTP clients, enabling more flexibility in testing and production scenarios:

  • Mocking in Test Scenarios: Easily mock HTTP responses without needing to set up a full HTTP test server
  • Pre-constructed Clients: Use your own pre-configured HTTP clients with Fast Shot
  • Instrumented Clients: Integrate clients that have been set up with your own instrumentation or logging

Example usage:

customClient := &http.Client{
    Timeout: time.Second * 30,
    // Other custom configurations...
}

client := fastshot.NewClient("https://api.example.com").
    Config().SetCustomHttpClient(customClient).
    Build()

Improvements

  • Enhanced error handling and reporting
  • Improved documentation and examples
  • Performance optimizations

Breaking Changes

  • The Retry() method now returns a new RetryBuilder instead of directly setting retry attempts. Please update your code accordingly.

🤝 We strongly recommend updating to this latest version to take advantage of these new capabilities. As always, we appreciate your feedback and contributions to make Fast Shot even better.

Full Changelog: v0.10.0...v1.0.0

v0.10.0

10 Mar 20:27
82ec673
Compare
Choose a tag to compare

Release

We are thrilled to announce that the Fast Shot library now includes a new feature that allows to inject custom HTTP clients.

New Feature

  • Custom HTTP Client: This feature allows you to inject custom HTTP clients, for mocking rather than http test scenarios, and using pre-constructed or instrumented http clients.

Contributors


🤝 Please update to the latest version to take advantage of this new capability. As always, we appreciate your feedback and contributions to make Fast Shot even better.

v0.9.0

21 Dec 15:23
95badee
Compare
Choose a tag to compare

Release

We are thrilled to announce that the Fast Shot library now includes a new feature that allows out-of-the-box support for client load balancing.

New Feature

  • Client Load Balancing: This feature allows you to distribute network traffic across several servers, enhancing the performance and reliability of your applications. The NewClientLoadBalancer function takes an array of URLs as input, and the client will automatically balance the load among these endpoints.

🤝 Please update to the latest version to take advantage of this new capability. As always, we appreciate your feedback and contributions to make Fast Shot even better.

v0.8.3

21 Nov 19:06
Compare
Choose a tag to compare

Release

  • Enhancement in response errors in case of failed retry.

🤝 Please update to the latest version to take advantage of this new capability. As always, we appreciate your feedback and contributions to make Fast Shot even better.