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

Use Rust FFI #15: Remove StubServerHttpService #346

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Oct 8, 2023

When stub server is started, it may serve various requests/responses:

  • method: GET, POST, PUT, PATCH, DELETE
  • any combination of: path, query, headers
  • body: json, xml, csv, protobuf, binary, multipart...

I remove StubServerHttpService because: It doesn't provide that flexibility. All it does is send a GET /endpoint request with a single header Content-Type: application/json, and expect response to be json string. Why not let user install the package (e.g. guzzle) and send the request however they want?

I also remove GuzzleClient because it doesn't do anything special. All it does is proxy calls to the actual guzzle client.

We can remove those code so we don't have to maintain them.

@tienvx tienvx force-pushed the remove-stub-server-http-service branch from ed213d3 to 7ddfe04 Compare October 9, 2023 14:46
@tienvx tienvx force-pushed the remove-stub-server-http-service branch from 7ddfe04 to f121fb2 Compare October 9, 2023 15:16
@YOU54F
Copy link
Member

YOU54F commented Oct 12, 2023

make sense it if increases end user flexibility and reduces the code we need to maintain, that is of limited value.

Just as note, you can add the following in your commit message to denote a breaking change.

BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.

@YOU54F YOU54F self-requested a review October 12, 2023 15:51
@YOU54F YOU54F merged commit 8f2da63 into pact-foundation:ffi Oct 12, 2023
23 of 26 checks passed
@tienvx tienvx deleted the remove-stub-server-http-service branch October 13, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants