I am making my first pull request to add support to POST method using CURL. This allows to add basic String value or Json String value to the request as -d or --data parameter. I will add more methods and features as soon as possible.
Headers are not supported yet.
If method is 'GET', body may no have any effect in the request.
UTF-8 encoding setted as default.
This PR fixes or closes issue: fixes #8
Post Test
I'm using this feature for a personal project and testing this feature I got a successful result.
Code used to make request:
final client = CurlClient();
final rs = await client.send(Request('POST', 'http://192.168.4.1:6104/', body: jsonTemplate));
if(rs.statusCode == 200){
final textContent = await rs.readAsString();
print(textContent);
}
I am making my first pull request to add support to POST method using CURL. This allows to add basic String value or Json String value to the request as -d or --data parameter. I will add more methods and features as soon as possible.
Post Test
I'm using this feature for a personal project and testing this feature I got a successful result.
Code used to make request:
Data used in jsonTemplate variable:
Received response