/EasyWebAPI

An extension that makes Get and Post to Web API easily and fast.

Primary LanguageC#MIT LicenseMIT

EasyWebAPI

Nuget NuGet

An extension that makes Get and Post to Web API easily and fast.

Guide - QuickStart

POST File to API without Header:

EasyWebApi.addFile("<your-path-file", "your-files-key", "your-file-name.extensions-value");
string responseString = EasyWebApi.postFile("<your-url-api");

POST File to API with Header:

EasyWebApi.addFile("<your-path-file", "your-files-key", "your-file-name.extensions-value");
EasyWebApi.addHeader("value", "key"); //You can add multiple Headers
string responseString = EasyWebApi.postFile("<your-url-api", true);

POST Header to API without File:

EasyWebApi.addHeader("value", "key"); //You can add multiple Headers
string responseString = EasyWebApi.postHeader("<your-url-api");

GetString from API

string responseString = EasyWebApi.getContent("<your-url-api");

Get Status Code

int StatusCode = EasyWebApi.getStatusCode;

License

The source code is licensed under the MIT license.