private IRestRequest CreateRestRequestWithFile(IYouTrackFileRequest request, Method method) { IRestRequest restRequest = CreateRestRequest(request, method); AddFileToRestRequest(request, restRequest); return(restRequest); }
private IRestResponse ExecuteRequestWithFile(IYouTrackFileRequest request, Method method) { IRestRequest restRequest = CreateRestRequestWithFile(request, method); IRestResponse restResponse = restClient.Execute(restRequest); ThrowIfRequestFailed(restResponse); return(restResponse); }
public IRestRequest CreateRestRequestWithFile(IYouTrackFileRequest request, ISession session, Method method) { IRestRequest restRequest = CreateRestRequest(request, session, method); AddFileToRestRequest(request, restRequest); //Using Accept=application/xml for files doesn't work in 5.x http://youtrack.jetbrains.com/issue/JT-25271 ReplaceAcceptWithJson(restRequest); return restRequest; }
private void AddFileToRestRequest(IYouTrackFileRequest request, IRestRequest restRequest) { if (request.HasBytes) { restRequest.AddFile(request.Name, request.Bytes, request.FileName); } else { restRequest.AddFile(request.Name, request.FilePath); } }
public IRestRequest CreateRestRequestWithFile(IYouTrackFileRequest request, ISession session, Method method) { IRestRequest restRequest = CreateRestRequest(request, session, method); AddFileToRestRequest(request, restRequest); //Using Accept=application/xml for files doesn't work in 5.x http://youtrack.jetbrains.com/issue/JT-25271 ReplaceAcceptWithJson(restRequest); return(restRequest); }
public IRestRequest CreateRestRequestWithFile(IYouTrackFileRequest request, ISession session, Method method) { return(restFileRequestFactory.CreateRestRequestWithFile(request, session, method)); }
private IRestResponse ExecuteRequestWithAuthenticationAndFile(IYouTrackFileRequest request, Method method) { LoginIfNotAuthenticated(); return(ExecuteRequestWithFile(request, method)); }
public IRestRequest CreateRestRequestWithFile(IYouTrackFileRequest request, ISession session, Method method) { return restFileRequestFactory.CreateRestRequestWithFile(request, session, method); }