Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting result of a task
Message
From
21/11/2016 08:08:09
 
General information
Forum:
ASP.NET
Category:
Common Language Runtime
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01643645
Message ID:
01643754
Views:
29
Likes (1)
>>>Here is what I see (attached). I think one of the problems is that it's showing wrong content type - it should be JSON. Do you know what should I change?
>>
>>What do you mean by 'wrong content type'? JSON is there - Fiddler is showing a representation of JSON. Does 'raw' view show the json object ?
>
>Here is what raw view shows:
>
>
>POST https://dev.citypass.com/integrationapi//Attraction/Tickets/Validate HTTP/1.1
>Accept: application/json
>Authorization: Basic something here
>Cache-Control: max-age=0
>Content-Type: application/json; charset=utf-8
>Host: dev.citypass.com
>Content-Length: 117
>Expect: 100-continue
>Connection: Keep-Alive
>
>{"TicketBarcode":"BarcodeHere","TicketUsageDate":"2016-10-28T15:09:06.7021957-06:00","UserID":"userNameHere"}
>
>and this is what I am supposed to send:
>
>
>POST /integrationapi//Attraction/Tickets/Validate HTTP/1.1
>Host: dev.citypass.com
>Content-Type: application/json
>Authorization: Basic different info here (not the one I send)
>Cache-Control: no-cache
>Postman-Token: 5fabe5b7-5d25-ac19-e81e-0f41a702f793
> 
>{
>  "TicketUsageRequests": [
>    {
>      "TicketBarcode": "01120800369235",
>      "TicketUsageDate": "2016-10-28T15:09:06.7021957-06:00",
>      "UserID": "patrick" // User is also different, don't know if it matters
>}
>  ]
>}
>
>
>Also, in my request I do not see the name of the object - how should I send it as well?

Firstly fix your headers - you can see what's needed so set the headers accordingly.

The Json object (TicketUsageRequests) is an array of objects so put the item in an array.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform