-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathIRestClient.cs
More file actions
34 lines (25 loc) · 1.56 KB
/
IRestClient.cs
File metadata and controls
34 lines (25 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.IO;
namespace ServiceStack
{
public interface IRestClient : IRestClientSync
{
void AddHeader(string name, string value);
void ClearCookies();
Dictionary<string, string> GetCookieValues();
void SetCookie(string name, string value, TimeSpan? expiresIn = null);
TResponse Get<TResponse>(string relativeOrAbsoluteUrl);
IEnumerable<TResponse> GetLazy<TResponse>(IReturn<QueryResponse<TResponse>> queryDto);
TResponse Delete<TResponse>(string relativeOrAbsoluteUrl);
TResponse Post<TResponse>(string relativeOrAbsoluteUrl, object request);
TResponse Put<TResponse>(string relativeOrAbsoluteUrl, object requestDto);
TResponse Patch<TResponse>(string relativeOrAbsoluteUrl, object requestDto);
TResponse Send<TResponse>(string httpMethod, string relativeOrAbsoluteUrl, object request);
TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, string mimeType);
TResponse PostFileWithRequest<TResponse>(Stream fileToUpload, string fileName, object request, string fieldName = "upload");
TResponse PostFileWithRequest<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, object request, string fieldName = "upload");
TResponse PostFilesWithRequest<TResponse>(object request, IEnumerable<UploadFile> files);
TResponse PostFilesWithRequest<TResponse>(string relativeOrAbsoluteUrl, object request, IEnumerable<UploadFile> files);
}
}