##Ideabiz Request handler .NET C#
This library need NEWTON JSON library. Please install it
https://www.nuget.org/packages/Newtonsoft.Json/
- Import this code to project
- Install
Newtonsoft.Json
- Generate tokens using https://ideabiz.lk/tools/
- Save token and credentials to Ideabiz.settings (Can use VisualStudio UI to do this)
- Create Object
- Send API call
IdeabizRequestHandler rh = new IdeabizRequestHandler();
####Send api call
can send apicall using sendAPICall
method
IdeabizResponse rsponse = rh.sendAPICall(url, IdeabizAPIAuth.REQUEST_METHOD.POST, body, "application/json","application/json");
####Parameters
Parameters | Description |
---|---|
URL | Request full URL (eg : https://ideabiz.lk/apicall/smsmessaging/v2/94777123456/request |
method | IdeabizAPIAuth.REQUEST_METHOD GET OR POST |
body | plain text body. JSON string or urlencoded body |
contentType | Content type, eg: application/json |
accept | Accept content type : eg application/json |
####Return IdeabizResponse class
Parameters | Description |
---|---|
status | SUCCESS OR ERROR |
statusCode | HTTP status code (Eg : 200,400) |
body | API call response |
####Saving credentials
This class save credentials in settings. If need save settins on DB or other data souce, please re impliment IdabizAuth.readSettings()
and IdabizAuth.saveSettings()
method