Skip to content

Support JSON response body #3

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

Merged
merged 4 commits into from
Apr 6, 2016

Conversation

ddrozdov
Copy link
Contributor

This implements issue #2
Store JSON response body in jsonBody field; Transform dot notation to nested JSON

@codecov-io
Copy link

Current coverage is 20.11%

Merging #3 into master will increase coverage by +12.73% as of 4ea9915

@@            master      #3   diff @@
======================================
  Files            4       4       
  Stmts          149     179    +30
  Branches         1       6     +5
  Methods          0       0       
======================================
+ Hit             11      36    +25
  Partial          0       0       
- Missed         138     143     +5

Review entire Coverage Diff as of 4ea9915

Powered by Codecov. Updated on successful CI builds.

@ddrozdov ddrozdov changed the title This implements issue #2 Support JSON response body Jan 26, 2016
@ddrozdov
Copy link
Contributor Author

That's my first experience in Go so it is probably not the best solution, but still it works :)

@christiangalsterer
Copy link
Owner

Finally I had some time to look into it.
What I have in mind is to use only one fields and depending on the type of the response of the HTTP call this is then either a simple string of a json structure.

If the HTTP response can be parsed as a json object then it will be returned as a json structure. Here I plan to use the mode parameter is in your PR. If the HTTP response cannot be parsed as a structure then the response as returned unchanged as a string.

What do you think?

@ddrozdov
Copy link
Contributor Author

Thought about it, but this would make it impossible to use the same index name for both json and non-json responses because the body field type in Elasticsearch can't be a string and a group at the same time.

@christiangalsterer
Copy link
Owner

Valid point, will rethink it again.

@ddrozdov
Copy link
Contributor Author

Any news here?

@christiangalsterer
Copy link
Owner

I was busy with some activities in the last weeks. I will look into it the next days but most likely the PR will be merged unchanged or only smaller internal changes and keeping the approach using a dedicated field.

@christiangalsterer christiangalsterer merged commit 3719437 into christiangalsterer:master Apr 6, 2016
@christiangalsterer
Copy link
Owner

I merged your PR unchanged and a release 1.1.0 is available. Thanks very much for your contribution again.

@ddrozdov
Copy link
Contributor Author

ddrozdov commented Apr 6, 2016

👍

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.

3 participants