7.6 KiB
Org.OpenAPITools.Api.MultipartApi
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
MultipartArray | POST /multipart-array | |
MultipartMixed | POST /multipart-mixed | |
MultipartSingle | POST /multipart-single |
MultipartArray
void MultipartArray (List<System.IO.Stream> files = null)
MultipartFile array test
Example
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class MultipartArrayExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new MultipartApi(config);
var files = new List<System.IO.Stream>(); // List<System.IO.Stream> | Many files (optional)
try
{
apiInstance.MultipartArray(files);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MultipartApi.MultipartArray: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the MultipartArrayWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
apiInstance.MultipartArrayWithHttpInfo(files);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MultipartApi.MultipartArrayWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
files | List<System.IO.Stream> | Many files | [optional] |
Return type
void (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: multipart/form-data
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MultipartMixed
void MultipartMixed (MultipartMixedStatus status, System.IO.Stream file, MultipartMixedRequestMarker marker = null, List statusArray = null)
Mixed MultipartFile test
Example
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class MultipartMixedExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new MultipartApi(config);
var status = (MultipartMixedStatus) "ALLOWED"; // MultipartMixedStatus |
var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | a file
var marker = new MultipartMixedRequestMarker(); // MultipartMixedRequestMarker | (optional)
var statusArray = new List<MultipartMixedStatus>(); // List<MultipartMixedStatus> | (optional)
try
{
apiInstance.MultipartMixed(status, file, marker, statusArray);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MultipartApi.MultipartMixed: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the MultipartMixedWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
apiInstance.MultipartMixedWithHttpInfo(status, file, marker, statusArray);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MultipartApi.MultipartMixedWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
status | MultipartMixedStatus | ||
file | System.IO.Stream****System.IO.Stream | a file | |
marker | MultipartMixedRequestMarker | [optional] | |
statusArray | List<MultipartMixedStatus> | [optional] |
Return type
void (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: multipart/form-data
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MultipartSingle
void MultipartSingle (System.IO.Stream file = null)
Single MultipartFile test
Example
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class MultipartSingleExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
var apiInstance = new MultipartApi(config);
var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | One file (optional)
try
{
apiInstance.MultipartSingle(file);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MultipartApi.MultipartSingle: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the MultipartSingleWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
apiInstance.MultipartSingleWithHttpInfo(file);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MultipartApi.MultipartSingleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
file | System.IO.Stream****System.IO.Stream | One file | [optional] |
Return type
void (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: multipart/form-data
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]