Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31048

GET request to POST request error

$
0
0

I have converted an API query from a functioning GET request to a nonfunctioning POST request.

 

The POST request uses a function to call the service. The function is:

 

let functionName = (param1 as text) =>
    let
        Source = Json.Document(Web.Contents("https://data.police.uk/api/crimes-street/all-crime", [Content = Text.ToBinary(param1)]))
    in
    Source

in 
functionName

 

 

An example of param1 is:

 

poly=51.333334,0.538979:51.334288,0.537429:51.336624,0.534575:51.336066,0.532365:51.334182,0.527714:51.334176,0.527285:51.334598,0.526137:51.33534,0.525435:51.335913,0.523858:51.336925,0.52338:51.33769,0.522:51.33865,0.521602:51.339395,0.520975:51.339126,0.518314:51.339926,0.516449:51.340587,0.51578:51.340406,0.513506:51.342105,0.512985:51.343906,0.513111:51.344699,0.513949:51.344515,0.514418:51.344811,0.514936:51.346791,0.516382:51.347798,0.518048:51.347762,0.518405:51.348778,0.518711:51.349395,0.520096:51.349255,0.520342:51.34942,0.520694:51.349725,0.520402:51.349921,0.520591:51.349884,0.520977:51.350826,0.521778:51.350391,0.523407:51.35049,0.524993:51.349502,0.525358:51.349597,0.526382:51.349035,0.527615:51.348231,0.528202:51.347518,0.529829:51.347128,0.530364:51.347345,0.530854:51.346576,0.532478:51.346223,0.53209:51.34613,0.532684:51.345932,0.532583:51.345889,0.532805:51.345275,0.532822:51.344953,0.532296:51.344236,0.533508:51.343934,0.532929:51.343811,0.533082:51.343328,0.53209:51.34349,0.53189:51.343261,0.531381:51.343077,0.531545:51.342975,0.530327:51.342276,0.530832:51.341784,0.530885:51.341887,0.531426:51.340858,0.532404:51.342165,0.534552:51.343346,0.537226:51.343414,0.537988:51.34411,0.537598:51.34436,0.538224:51.344081,0.539008:51.341823,0.538757:51.339751,0.537854:51.339076,0.537797:51.338139,0.53791:51.336394,0.538586:51.33454,0.538398:51.333334,0.538979

 

The API documentation is available here

 

Any help would be appreciated.

 

 


Viewing all articles
Browse latest Browse all 31048

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>