Class SurveysPackageClient
public class SurveysPackageClient
- Inheritance
-
SurveysPackageClient
- Inherited Members
Constructors
SurveysPackageClient(string, HttpClient)
public SurveysPackageClient(string baseUrl, HttpClient httpClient)
Parameters
baseUrlstringhttpClientHttpClient
Properties
BaseUrl
public string BaseUrl { get; set; }
Property Value
JsonSerializerSettings
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
- JsonSerializerSettings
ReadResponseAsString
public bool ReadResponseAsString { get; set; }
Property Value
Methods
GetAsync(string, InterviewPackageType?, CancellationToken)
Get the specified type of package for the specified survey.
public virtual Task<SurveyPackageV1Model> GetAsync(string surveyId, InterviewPackageType? type = null, CancellationToken cancellationToken = default)
Parameters
surveyIdstringis of the survey
typeInterviewPackageType?type of package to get
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyPackageV1Model>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<SurveysPackageClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T