iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Dear Master..,
Have You any idea to dev the android app that handle the HTTP Post by using the crosslight ?,
please give me the info ..
thanks
Agus
Hi Agus,
To make a HTTP Post request, you will need to create a RestRequest with Post HTTP Method that will be handled by the RestClient. Bellow will be a simple example code:
// Create a RestClient with specified baseURLstring baseUrl = "http://baseURL/";IRestClient client = new RestClient(baseUrl); // Create a request that use Htpp POST Method. string resource = "resourcename" RestRequest request = new RestRequest(resource, HttpMethod.POST);// Set Request Data Format to Json request.RequestFormat = RequestDataFormat.Json; // Serializes obj to data format specified by RequestFormat and adds it to the request body. request.AddBody(Data); // Execute the RestRequest IRestResponse response = await client.ExecuteAsync(request);
For your information, you could send a file in your request with request.AddFile:
request.AddFile("parameter name", byteData, "filename.jpg");
For your information, you could also change your repository behaviour to use RestRequest with Post HTTP method by overwriting the request initialization process of your repository. Example, if you want to use RestRequest with Post HTTP method for GetAllAsync, please overwrite the InitializeGetAllAsyncRequest and return a RestRequest with POST HTTP method.
Hope that this will help you.
Best Regards,Leo
For a detail regarding server data access, you could refer to http://developer.intersoftpt.com/display/crosslight/Server+Data+Access.
Btw, could you tell me what the specific topic that you would like to hear in regard to HTTP Post request. That way I may be able to provide you with the information that you want.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname