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

extend Http class to be able to set a hook #2381

Closed
tstanczak opened this issue Aug 15, 2023 · 8 comments
Closed

extend Http class to be able to set a hook #2381

tstanczak opened this issue Aug 15, 2023 · 8 comments
Assignees
Milestone

Comments

@tstanczak
Copy link

Creating a Http request from Java is easy and comfortable yet doesn't expose all possibilities of the underlying HttpRequestBuilder, like the ability to set a RuntimeHook.
There are workarounds, but already having a general hook it would be easier if being able to set on such manually created Http so that all http requests travel the same way.

@ptrthomas
Copy link
Member

you mean the Java API, and the Http class, okay gotcha. to be honest most teams use the DSL. I recommend you submit a PR, it should be very straightforward, just add a couple methods on that class etc. we can guide.

@tstanczak
Copy link
Author

Hi,
so I have extended Http and created a JUnit Test. Now how should I proceed? Is it preferred to make a branch of develop? Or is it irrelevant, if you accept the changes you would merge into develop anyway?

@tstanczak
Copy link
Author

I guess I missed something - I need to fork first to be able to contribute...

@ptrthomas
Copy link
Member

ptrthomas commented Sep 4, 2023

@tstanczak you can just add one or more methods to the existing Http class, don't bother extending it. see if our contributor guide helps: https://github.com/karatelabs/karate/blob/master/.github/CONTRIBUTING.md

@tstanczak
Copy link
Author

Yes, the code does modify existing class and is ready and tested. It's just that I never used GitHub collaboration before, always worked in a corporation environment with enough access rights to just create a branch and push it into the original repository. Now I think the way to go is to create a fork, make a branch there and make a PR out of the fork. I'll do it after my daily work.
And before I do that I'll read your contributing guide :-) - thanks for pointing out!

@tstanczak tstanczak mentioned this issue Sep 4, 2023
4 tasks
@tstanczak
Copy link
Author

I have just made a PR.

@ptrthomas ptrthomas added this to the 1.4.1 milestone Sep 6, 2023
@ptrthomas
Copy link
Member

@tstanczak merged with thanks 👍

@ptrthomas
Copy link
Member

1.4.1 released

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

No branches or pull requests

2 participants