Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Response

mattkol edited this page Dec 17, 2016 · 7 revisions

SugarRestSharp request - SugarRestResponse class has the following properties:

Property Description Comment
Data Formatted data returned by RestSharp See more info below.
JData Formatted json data returned by RestSharp This is same as "Data" but in json. It also has only values for selected fields if set in [Options](Request Options).
JsonRawRequest Raw json request as is sent to RestSharp This can be useful for diagnostic purposes.
JsonRawResponse Raw json response as is returned from RestSharp This can be useful for diagnostic purposes and alternative deserialization.
StatusCode Http status code returned by RestSharp or exception returned. Ok (200) is only valid status code.
Error Formatted error returned from RestSharp or error in internal processing. The error model is of type ErrorResponse.

Data Property Value

Request Type Value Type Comment
ReadById Entity data Module entity data (e.g Account object).
BulkRead Entity collection data Module entity collection data (e.g List<Account> objects).
PagedRead Entity collection data Module entity collection data (e.g List<Account> objects).
Create Module id Module entity identifier in string.
BulkCreate Module id collection Module identifier collection data (e.g IList in string).
Update Module id Module entity identifier in string.
BulkUpdate Module id collection Module identifier collection data (e.g IList in string).
Delete Module id Module entity identifier in string.
LinkedReadById Entity data Module entity data (e.g CustomAccount object).
LinkedBulkRead Entity collection data Module entity collection data (e.g List<CustomAccount> objects).