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

Feature storm httpapi params #1856

Merged
merged 6 commits into from
Aug 21, 2020
Merged

Conversation

vEpiphyte
Copy link
Contributor

  • Add an optional params argument to $lib.inet.http functions to send arbitrary request parameters.
  • Add a test harness to act as a bit of an http reflector, change some $lib.inet.http... tests to use that instead of making lots of nodes.

@codecov
Copy link

codecov bot commented Aug 20, 2020

Codecov Report

Merging #1856 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1856      +/-   ##
==========================================
+ Coverage   96.30%   96.36%   +0.06%     
==========================================
  Files         141      141              
  Lines       27628    27628              
==========================================
+ Hits        26606    26623      +17     
+ Misses       1022     1005      -17     
Flag Coverage Δ
#linux 96.36% <100.00%> (+0.06%) ⬆️
#linux_replay 66.67% <23.07%> (+1.83%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
synapse/lib/stormhttp.py 100.00% <100.00%> (ø)
synapse/tests/utils.py 95.22% <100.00%> (+2.01%) ⬆️
synapse/lib/lmdbslab.py 98.68% <0.00%> (+0.20%) ⬆️
synapse/common.py 97.10% <0.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a13aba...934241c. Read the comment docs.

@@ -32,24 +32,14 @@ async def _httpEasyGet(self, url, headers=None, ssl_verify=True):

ssl_verify (bool): Perform SSL/TLS verification. Defaults to true.

params (dict): Optional parameters which may be passed to the request.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we're passing the params directly through to aiohttp, technically this can be multiple types and I've got tests for each of them; if only to 1) avoid isinstance code and 2) support recurring key options in params

@invisig0th invisig0th merged commit 062fbd2 into master Aug 21, 2020
@invisig0th invisig0th deleted the feature_storm_httpapi_params branch August 21, 2020 10:37
@vEpiphyte vEpiphyte added this to the v2.7.0 milestone Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants