Skip to content

add http_response plugin#943

Closed
lswith wants to merge 9 commits intoinfluxdata:masterfrom
lswith:master
Closed

add http_response plugin#943
lswith wants to merge 9 commits intoinfluxdata:masterfrom
lswith:master

Conversation

@lswith
Copy link
Contributor

@lswith lswith commented Mar 31, 2016

solves issue #332

@lswith
Copy link
Contributor Author

lswith commented Mar 31, 2016

I may add the ability to parse http headers in the format:

'''
Host: www.mycompany.com
Content-Type: text
'''

@lswith
Copy link
Contributor Author

lswith commented Mar 31, 2016

That should be enough input for what I need.

@sparrc
Copy link
Contributor

sparrc commented Mar 31, 2016

Thanks for the contribution @lswith, but instead of a standalone plugin, do you think you could add this to the net_response plugin?

@sparrc
Copy link
Contributor

sparrc commented Mar 31, 2016

although the addition of headers may make that difficult

@lswith
Copy link
Contributor Author

lswith commented Apr 1, 2016

I thought about it and I feel like this is too different to it. Yes they both track response time, however an http request is quite different to a tcp connection.

@sparrc
Copy link
Contributor

sparrc commented Apr 1, 2016

sure, I think actually it's OK to leave as separate

headers = '''
Host: github.com
'''
## Whether to follow redirects from the server (defaults to false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be indented by two spaces, not tabs

@sparrc
Copy link
Contributor

sparrc commented Apr 1, 2016

overall this looks good, but you'll need to write unit tests.

@lswith
Copy link
Contributor Author

lswith commented Apr 3, 2016

will do.

@lswith
Copy link
Contributor Author

lswith commented Apr 5, 2016

Tests are complete. Waiting on you guys

## Server address (default http://localhost)
address = "http://github.com"
## Set response_timeout (default 10 seconds)
response_timeout = 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default this to 5 seconds

@sparrc
Copy link
Contributor

sparrc commented Apr 7, 2016

thanks @lswith, closed by 90185dc

@sparrc sparrc closed this Apr 7, 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.

2 participants