RestCode / WebApiProxy

MIT License
199 stars 91 forks source link

WebApiProxy.CSharp generated code shows error error: No overload for method 'PutAsJsonAsync' takes 1 arguments #34

Closed pauliusg closed 9 years ago

pauliusg commented 9 years ago

Generated

public virtual async Task<HttpResponseMessage> UpdateProcessedImageFlagAsync(Int32 imageId,Boolean processedImage)
{
    return await HttpClient.PutAsJsonAsync("api/UpdateProcessedImage?imageId=" + imageId + "&processedImage=" + processedImage);
}

I fixed manually like this and it works:

public virtual async Task<HttpResponseMessage> UpdateProcessedImageFlagAsync(Int32 imageId,Boolean processedImage)
{
    return await HttpClient.PutAsJsonAsync("api/UpdateProcessedImage?imageId=" + imageId + "&processedImage=" + processedImage, string.Empty);
}
faniereynders commented 9 years ago

@pauliusg This has been resolved. It will add default(HttpResponseMessage) instead of string.Empty if no body is specified.

pauliusg commented 9 years ago

Thanks for quick fix!

faniereynders commented 9 years ago

You're welcome 😊