.NET Server-Side Post to Web API using Editor

.NET Server-Side Post to Web API using Editor

fabiomoggifabiomoggi Posts: 9Questions: 4Answers: 0
edited August 2016 in Free community support

I am developing a .NET Web API project based on Editor that will play as the REST API server to my suite of apps.

One of the apps is a console application responsible for reading a local database and upload data to the API.

I was able to follow Editor's examples and documentation to have the API up and running - it is doing CRUD operations triggered by the front-end web site. However, I am struggling with uploading data from anywhere else than the web site app. Specifically, I have this console app on .NET and would like to upload data to the API using JSON. I managed to convert my C# classes into JSON files using newtonsoft.json, however, Editors does not create or update data, neither throws any exception, leaving the impression it is just ignoring the POST request.

I turned on Fiddler to help me understand how the website posts data to the API server and I realized it was not in the JSON format. Instead, it was a string attached to the request body. That path would be very time consuming as I would need to go through every single class attribute, read its value and concatenate a string to simulate the form post.

Has anyone been through this before? Is it possible to post a json to Editor persist on database?

Any help will be very much appreciated.

Thanks!

Answers

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    Thanks for the extra details here. Let's continue the discussion in your other thread since they are basically covering the same topic.

    Allan

This discussion has been closed.