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

Improve support for x-form-urlencoded content usage with http:Client #797

Merged
merged 9 commits into from
Dec 23, 2021

Conversation

ayeshLK
Copy link
Member

@ayeshLK ayeshLK commented Dec 22, 2021

Purpose

$subject

Fixes #1705

Examples

Initially when sending x-form-urlencoded content via http:Client developers had to do additional work to generating the text payload. But with this improvement following is possible.

http:Response response = check snowpeak->post("/update", 
    {
        "key1": "value1",
        "key2": "value2"
    }, 
    mediaType=mime:APPLICATION_FORM_URLENCODED
);

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests

@codecov
Copy link

codecov bot commented Dec 22, 2021

Codecov Report

Merging #797 (92bbefa) into master (3f716cc) will increase coverage by 0.13%.
The diff coverage is 97.36%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #797      +/-   ##
============================================
+ Coverage     80.62%   80.76%   +0.13%     
  Complexity       71       71              
============================================
  Files           344      344              
  Lines         17615    17632      +17     
  Branches       3978     3990      +12     
============================================
+ Hits          14202    14240      +38     
+ Misses         2633     2618      -15     
+ Partials        780      774       -6     
Impacted Files Coverage Δ
ballerina/http_commons.bal 88.03% <95.23%> (+0.47%) ⬆️
ballerina/http_client_endpoint.bal 88.53% <100.00%> (ø)
ballerina/resiliency_failover_client.bal 86.40% <100.00%> (ø)
ballerina/resiliency_load_balance_client.bal 87.59% <100.00%> (ø)
...a/stdlib/http/transport/message/MessageFuture.java 91.30% <0.00%> (-4.35%) ⬇️
...transport/message/Http2InboundContentListener.java 51.28% <0.00%> (-2.57%) ⬇️
...ib/http/api/client/actions/AbstractHTTPAction.java 68.67% <0.00%> (+0.80%) ⬆️
...dlib/http/transport/message/HttpCarbonMessage.java 94.81% <0.00%> (+1.03%) ⬆️
...ttp/transport/message/HttpMessageDataStreamer.java 89.77% <0.00%> (+2.27%) ⬆️
...impl/listener/http2/Http2ServerTimeoutHandler.java 80.82% <0.00%> (+2.73%) ⬆️
... and 4 more

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 b8da145...92bbefa. Read the comment docs.

chamil321
chamil321 previously approved these changes Dec 23, 2021
@shafreenAnfar shafreenAnfar merged commit 8736602 into ballerina-platform:master Dec 23, 2021
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.

Provide a better way to send with application/x-www-form-urlencoded
3 participants