I am trying to run the API through the Unirest post method as given in the example.
The code is as follows.
HttpResponse<string> response = Unirest.Post(“https://japerk-text-processing.p.mashape.com/sentiment/”)
.header(“X-Mashape-Authorization”, “<My API Key>”)
.field(“text”, “This is awesome”)
.field(“language”, “english”)
.asJson<string>();
However, even after a lot of trying, I get error message as
"Form Validation Errors\ntext: This field is required.\n"
Any quick help will be greatly appreciated as I am in urgency to get a sentiment API done.
चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:
What language are you using? Have you tried with a different language/client library? The client library you’re using is clearly not passing in the correct form fields, so maybe you can inform the unirest developers.
Hai Japerk
First let me thank you’ll for the reply.
I am using C#. Than using the Unirest Library, I tried using the generic Post method in the native MSDN method. The code is below. Then too, I received only a 403 forbidden reply. I ensured that my key is right. Any help will be appreciated.
HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(“https://japerk-text-processing.p.mashape.com/sentiment/”);
Hi mneticjab, please email me at chris@mashape so I can help you out. Thanks
Sorry, I thought you’d taken this issue up with Chris. Have you heard back from him?
Ugh, sorry about the formatting, I tried to fix it but it won’t let me edit.
This is Bad. Closing the issue without a solution!
Hey Arun, I think I replied to you 4 days ago with the sample .NET code? Did you get it?
No replies for a month, so I’m going to assume devitsu’s solution is correct and/or the issue has been resolved.
Hi,
(Hopefully someone else might find this useful)
I had a similar issue with Unirest, the following worked for me:
Hai Ismaelc,
Thanks for your interest. I will mail you immediately.