first of all, i have to explain why i'm asking this here: i've to write a sort of client for a website, the guy which has made the website, the databases, the REST services etc is gone from the web agency and the other guy who's still there isnt' happy (at all) for it, he says to me he don't know a lot about the website and so on, and can't (won't, actually) help me

so, i have to deal with this: a REST service to get information and data from the website
the guy on the phone told me a lot about javascript, JSON serialization and many more, but he don't give me a single line of useful code
i'm successfully grabbing data using GET command but i can't figure out how to deal with these two actions:
read the account status
Code: Select all
Url: http://www.eroxe.it/eroxeservice/eroxeservice/accounts/
HTTP Method: POST
The following is an example request Json body:
{
"Username":"String content",
"Password":"String content"
}
The following is an example response Json body:
{
"Valido":true,
"Scadenza":"String content"
}
get a file from the database (the service previously checks if the user has a valid subscription)
Code: Select all
Url: http://www.eroxe.it/eroxeservice/eroxeservice/novels/{ID}
HTTP Method: POST
The following is an example request Json body:
{
"Username":"String content",
"Password":"String content"
}
The following is an example response Json body:
{
"Codice":2147483647,
"Titolo":"String content",
"Testo":"String content",
"Genere":"String content",
"Autore":"String content",
"DataInserimento":"String content"
}
i tried to put the json request body code in a variable and post it to the website in the usual way (post variable to url "http://...") but it doesn't work and the website don't return anything
the website guy told me something about data serialization and javascript, the android app made from his ex coworker works this way to get a novel from the site:
- inside the android app: result =
Code: Select all
service.GetRaccontoByCodice(codice, new EroxeCredentials(username, password));
Code: Select all
public class EroxeCredentials
{
public string Username { get; set; }
public string Password { get; set; }
}
many thanks to all and many excuses for my english
