Forum Discussion
POST request In PQ Expression Error: 3 arguments were passed to a function which Details: Pattern =
I have made a post request using power querst but I receive this message error.
Expression.Error: 3 arguments were passed to a function which expects between 1 and 2.
Details:
Pattern=
Arguments=[List]
the code as the follwoing
------------------------------------------------------------------------------------------------------------------------
let
header= [#"ID" = "username", #"TOKEN" = "password", #"Content-Type" = "application/json; charset=utf-8"],
Body = [P_CITIZEN_ID= "inquery ID number"],
webdata = Web.Contents("url", [Headers=header,Query= P_CITIZEN_ID], [Content =Text.ToBinary(Body)]),
response = Json.Document(webdata)
in
response
---------------------------------------------------------------------------------------------
the authinticaiton is basic so no need for auth2.
information should be include in Postman are:
params = P_CITIZEN_ID
body = P_CITIZEN_ID
header = ID = "as username", token = "password"
the output should be result as being in postman
coloumn named status = (fail or success).
coloumn named GET_staff_information = (result should be record)
postman response
I found the solution and I will publish it later, I'm afraid to tell you, you have not solved the problem
3 Replies
- CNENFRNLCommunity Champion
webdata = Web.Contents("url", [Headers=header, Query=P_CITIZEN_ID, Content=Text.ToBinary(Body)])