Forum Discussion
Anonymous
7 years agoNot applicable
Need Cookie in my Rest API Custom data connector - Help please.
// This file contains your Data Connector logic
section SynDNA;
[DataSource.Kind="SynDNA", Publish="SynDNA.Publish"]
shared SynDNA.Feed = Value.ReplaceType(SynDNAImpl, type function (url as Uri.Type...
rlemmi
5 years agoFrequent Visitor
You might want to use fiddler to inspect the HTTP requests and from there obtain the correct address where you receive the Cookie value.
In one of my custom connectors, I get my cookie value with the following:
let
Source = Web.Contents(Uri.Combine(url, "authentication-point/authenticate"), [ Headers = DefaultRequestHeaders ]),
Source_Headers = Value.Metadata(Source)[Headers],
Auth_Cookie_Header = Source_Headers[#"Set-Cookie"],
Web API returns the headers and I retrieve them using Value.Metadata(). The cookie value I need is under the [#"Set-Cookie"].
Neiners
3 years agoHelper II
Can you explain this a little more? I'm struggling with this and I don't know if I need to build a custom connector (which I have no clue how to do). I have a login api that is using username and password as post method. Then I am to use the sessionid (#"Set-Cookie) created from that login api and pass that through the data api.