AcoustID.Web.SubmitService.SubmitAsync C# (CSharp) Method

SubmitAsync() public method

Submit audio data to the AcoustID webservice.
public SubmitAsync ( IEnumerable requests ) : Task
requests IEnumerable The submit request data.
return Task
        public async Task<SubmitResponse> SubmitAsync(IEnumerable<SubmitRequest> requests)
        {
            try
            {
                using (var body = BuildRequestBody(requests))
                {
                    // If the request contains invalid parameters, the server will return
                    // "400 Bad Request" and we'll end up in the first catch block.
                    string response = await WebHelper.SendPost(URL, body, UseCompression);

                    return parser.ParseSubmitResponse(response);
                }
            }
            catch (WebException e)
            {
                // Handle bad requests gracefully.
                return CreateErrorResponse(e.Response as HttpWebResponse);
            }
            catch (Exception e)
            {
                throw e;
            }
        }

Same methods

SubmitService::SubmitAsync ( SubmitRequest request ) : Task