I need a working example written of a simple json call to a .net webservice which can return the proper response.
There is a test available online and I can provide a piece of sample code. Basically a mobile app will be making a call to the service, the service will gather some information and send a response back - it should be pretty simple and fast.
I will be writing the service which needs to provide the response, what I am looking for is a working example of doing this in .net (prefer vb.net). I can access our data so in this project you can just put (GETDATAHERE) where you would access a database.
Here is a link to the testing page:
[login to view URL]
Here is the example code I was provided.
def entitlements(request, issue_type):
#have to check the api key
if [login to view URL]('api_key', default='') != settings.MAGPLUS_API_KEY:
#api key isn't right
resp = HttpResponse(
[login to view URL]({'error': 'Invalid api_key'}),
content_type='application/json')
resp.status_code = 403
else:
#check the session
try:
session = [login to view URL](
hash=[login to view URL]['session_token']
)
issues = [login to view URL](type=issue_type)
issue_ids = map(lambda x: x.issue_id, issues)
resp = HttpResponse(
[login to view URL]({
"username": [login to view URL],
"entitlements": issue_ids
}),
content_type='application/json'
)
except [login to view URL], e:
resp = HttpResponse(
[login to view URL]({'error': 'Invalid session_token'}),
content_type='application/json')
resp.status_code = 403
return resp
////
The area that directly references which issues the user should have access to is broken out below.
resp = HttpResponse(
[login to view URL]({
"username": [login to view URL],
"entitlements": issue_ids
}),
content_type='application/json'
)
////
Hello i was working now 2 years in germany where i made Server side and also client for Smart TV.
Json < > C# request response WAS MY DAILY BREAD :-) . I know everything about that and i also learn few people so i think i can explain and providel working samples in C# or VB.Net
$35 USD en 3 días
5,0 (10 comentarios)
3,8
3,8
3 freelancers están ofertando un promedio de $37 USD por este trabajo