Forum Discussion

ziyabikram96's avatar
ziyabikram96
Helper V
5 years ago
Solved

Not being able to access data via API Post Request

Hi, I have been trying to import data using Trulinks Road Haulage Association, UK(RHA) APIs. Most of the API requests are POST while rest of them being GET. GET APIs have been straightforward while ...
  • PhilipTreacy's avatar
    5 years ago

    Hi ziyabikram96 

    Including Content in your request makes the Web.Contents perform a POST, for example:

     

     

    Source = Json.Document(Web.Contents(url,[
    Headers = [#"Content-Type"="application/json"],
    Content = Text.ToBinary(body)
    ]
    ))

     

     

    I don't know exactly what you need to provide in the request (e.g. API Auth,Headers) as I don' t know the API,but this should get you started.  Post back if you need further assistance.

    regards

    Phil