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

add http_response plugin #943

Closed
wants to merge 9 commits into from
Closed

add http_response plugin #943

wants to merge 9 commits into from

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