Ravi Wayne
Posts: 0
Joined: Sat Jul 20, 2013 7:20 pm

REST Service working in Fiddler but not in Appery

I have a simple rest service to post data to a table. I am able to successfully use it from fiddler, but get an error from Appery when testing. I have tried with and without proxy. For date, I am using the JSON format as a input e.g, \/Date(928164000000-0400)\/. Tried different combinations here, but could not solve the issue. Any thoughts/suggestions?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

REST Service working in Fiddler but not in Appery

Hello Ravi!

What response do you get? Send us screen shots,
Please provide steps to reproduce.

Ravi Wayne
Posts: 0
Joined: Sat Jul 20, 2013 7:20 pm

REST Service working in Fiddler but not in Appery

Please see error below. Can I email the url and screen print information to an e-mail address?

{
"status":"400 Bad Request",
"url":"xxxxxx/xxxService/",
"response":"
}

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

REST Service working in Fiddler but not in Appery

Of course, email to a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.

Ravi Wayne
Posts: 0
Joined: Sat Jul 20, 2013 7:20 pm

REST Service working in Fiddler but not in Appery

I sent a email. Thank you.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

REST Service working in Fiddler but not in Appery

Thank you. I'll test and update.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST Service working in Fiddler but not in Appery

There is an issue on our side with the request being send as all strings when setting default values in service. Instead, set the values in mapping and test the service from the page:

This is how the service request looks:
Image

This is how the mapping looks:
Image

For JavaScript, you would define:

code
return 1;
/code
or
code
return " \ / Date(928164000000-0400) \ / &quot
/code
(I put the extra spaces for formatting only on the forum)

Make sure you have the proxy on.

We already have plans to add data type when defining service request.

To create the response, you can do this: http://docs.appery.io/documentation/r...

Ravi Wayne
Posts: 0
Joined: Sat Jul 20, 2013 7:20 pm

REST Service working in Fiddler but not in Appery

Thank you very much for your response. This works as illustrated above. However, I am hard coding the date values. Is there a way to convert the date input to json type in the java script? We found some examples to do this, but they require references to other java script libraries. Can we add our own java script library?

Thank you.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST Service working in Fiddler but not in Appery

Sure, you can do some basic string manipulation/formatting. You should need any special libraries.

Ravi Wayne
Posts: 0
Joined: Sat Jul 20, 2013 7:20 pm

REST Service working in Fiddler but not in Appery

Do you have any examples? Does the data control returning a value of type date or string? We tried javascript examples to convert date to json unsuccessfully.

Return to “Issues”