-
Notifications
You must be signed in to change notification settings - Fork 34
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 HttpOpener
.
#463
Extend HttpOpener
.
#463
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely requires (better) documentation and tests before we can proceed!
metafacture-io/src/main/java/org/metafacture/io/HttpOpener.java
Outdated
Show resolved
Hide resolved
metafacture-io/src/main/java/org/metafacture/io/HttpOpener.java
Outdated
Show resolved
Hide resolved
- add */* as content type default
metafacture-io/src/main/java/org/metafacture/io/HttpOpener.java
Outdated
Show resolved
Hide resolved
re "tests": |
Exactly. And I honestly don't think that's a good argument ;) The functionality is getting more complex and we should have at least some test coverage.
Yes, I could, but probably not too soon. |
I know the following is also not a good excuse - but can we merge this already because we have some issues to solve? |
Of course, I don't want to hold back progress. But we shouldn't rush anything prematurely, either. Are you sure that the design is sound? Do others want to chime in? I mean, there were some concerns regarding complexity and reusability. (Will you change the content-type default handling?) How would this be consumed, anyway? Are you going to publish a new release?
Haven't we all heard that one a thousand times? ;) |
Would be the basis for #464 and that one to solve https://gitlab.com/oersi/oersi-etl/-/issues/64. As long as there is no API break introduced (i.e. nothing that is already released would be broken) I am slack |
But how would you consume the updated version after the merge? Aren't you running from a checked out branch anyway? I'm not saying it would be better for you to change the branch in your build, but would it be an option? Would you consider it preferable to merging this "unfinished" pull request? |
How confident are we about that without any tests? ;) |
as we didn't have a test before we cannot test against anything. Besides some flux scripts which does API calls and manually check if the old ones do work as before. |
yes, it would. Ok, so I am going to use this PR at it is to implement agains it. (sorry for the noise, just getting a bit impatient ;) ) |
Okay, thanks :)
I know the feeling all too well ;) |
Whatever new tests we devise, we can run against the previous implementation. But until then we're in the dark, yes. |
While spiking out an approach for unit tests, I noticed that Is this something we need to be able to support? It's technically undefined, but quite common with Elasticsearch for instance. |
`HttpUrlConnection` throws `IOException` when trying to read `inputStream` instead of populating `errorStream`.
Added unit tests; documentation (Javadoc) could still use some work. |
metafacture-io/src/main/java/org/metafacture/io/HttpOpener.java
Outdated
Show resolved
Hide resolved
metafacture-io/src/main/java/org/metafacture/io/HttpOpener.java
Outdated
Show resolved
Hide resolved
@dr0i: Would you review the pull request? Can't seem to request a review from the submitter. |
83628ad
to
ea537d7
Compare
As an example you referenced Elasticsearch, but then Elasticsearch also allows POST, so we can stick to POST. So IMO we don't need to support "Get with payload body". |
Yes, Elasticsearch also supports It's only an issue with server implementations that behave differently for |
Re: "GET with body vs. POST" : |
Yes, I think we should proceed with the current implementation. I was just surprised by this behaviour and wanted to make sure we're on the same page. |
Re. GET with payload body, I like this post which made me aware of the HTTP QUERY Method (current draft). The post mentioned writes:
For rhe reconciliation API I just created an issue to track this. We should probably seriously consider supporting QUERY in the HTTPOpener as well. |
We're currently limited to the request methods that |
a489dee
to
b672731
Compare
Resolves #460.