We\'ve got a .net WebAPI which looks for a filepath string in the body of a post request and returns the corresponding image. I\'m struggling to successfully pass a string t
You can get the path
from query
by removing [fromBody]
attribute
public HttpResponseMessage ImagesFromPaths(HttpRequestMessage request, string path)
and in post send path in post
request ${apiUrl}/${path}
:
return this.http.post(
`${apiUrl}/${path}`,
{ headers: new HttpHeaders({
'Content-Type': 'application/json',
}), responseType: 'blob',
})