Forum Discussion
problems with POST call on REST API
- 4 years ago
Hi Anonymous
Try explicitly using HTTPS, your query currently is not.
https://localhost:5000/v1/api/iserver/secdef/searchRegards
Phil
Apart from the the missing accept header it looks benign. Care to try adding that?
Hi
I have placed a support call to the data provider. However they do not support nor comment on Power query (or end user platforms generally). So no success there at present.
I ran the diagnostics and got the following in hte detailed PQ analytics. What I note is that the Json record for headers and content is not displayed, and outside of creating another step to interrigate these records (which I have done and it looks fine), they don't appear in the results of the diagnostics. See below:
Request:
POST http://localhost:5000/v1/api/iserver/secdef/search HTTP/1.1
<Headers placeholder>
<Content placeholder>
Response:
<Content placeholder>
The exception raised is below (but outside of my skills to understand, troubleshoot, diagnose)
Exception:
ExceptionType: System.Net.WebException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxx
Message: The underlying connection was closed: The connection was closed unexpectedly.
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Mashup.Engine1.Library.Http.WrappingHttpWebRequest.<>c__DisplayClass119_0.<WrapResponse>b__0()
at Microsoft.Mashup.Engine1.Library.Http.WrappingHttpWebRequest.WrapExceptionResponse[T](Func`1 getValue)
at Microsoft.Mashup.Engine1.Library.Http.WebRequestFactory.TlsSniffingWebRequest.GetResponse()
at Microsoft.Mashup.Engine1.Library.Http.Request.CreateResponse(ResourceCredentialCollection credentials)
at Microsoft.Mashup.Engine1.Library.Http.Request.GetResponseCore(ResourceCredentialCollection credentials)
at Microsoft.Mashup.Engine1.Library.Http.RetryPolicy.Execute[TResult](IEngineHost host, Func`1 func)
at Microsoft.Mashup.Engine1.Library.Http.Request.GetResponse(ResourceCredentialCollection credentials, RetryPolicy retryPolicy, SecurityExceptionCreator securityExceptionCreator, Boolean tokenRefreshed)
I am running out of any angles I can change my review/solution hunting.
Are there ways to catch the error (try... otherwise ...? ), and perhaps review more detail (or is the detail posted above all of what comes from the server that I am hitting?). I haven't any other ways that I am aware of in hitting the server to apply a POST (query ?) with the field/Value pairs ?
Kind regards
Rohan