My bottle web service is not able to accept data to process, and am not able to figure out what the problem is.
am suspecting that the route statement and the corresponding def statement is not correct.
It returns:The remote server returned an error: (500) Internal Server Error.)
I need some help to figure this out what the route and def statement should be.
if the c# code is correct.
Here is the client code making the call.
using (var client = new WebClient())
{
var obj = new Dictionary<string, string>()
{
{"MemberOid", "564d783b54355e2070173117"},
{"ConnectionName", "mongodb://100.19.6.122"},
{"DBName", "NATHANDB"}
};
var dataString = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var response = client.UploadString("http://localhost:8080/" + "getData", "POST", dataString);
}
Here is the section of the web service, with the route/def statement.
@route('/getData', method='POST')
def getScore(updatedata):
data = request.body.readline()
...
...
any help will be appreciated.
thanks.