[Developers] coldfusion

Ryan Miller ninjascience at gmail.com
Mon Aug 6 20:53:46 UTC 2007


from what I can tell you're trying to do an HTTP POST to the freebase
site with your username and password sent as POST variables, getting
the metaweb-user cookie out of that response, than using that to do
your mql POST.  Why not just lookup your metaweb-user cookie value out
of your browser and hard-code into your app?  When I tried your code
the first POST that should return the cookie doesn't, so if you want
to keep going this route, concentrate there.  Make sure your sending
the vars under the right names (including case), and fake the
user-agent string to a common browser.

On 8/6/07, Mark CE <markce at btclick.com> wrote:
>
>
>  Don't worry I have tried both POST and GET, many times now!
>
>  Two crappy CF templates attached (testme.cfm which calls testme2.cfm).  I
> am not familiar with this list; if it doesn't accept attachments and I
> should be including the code in the body of this email, I guess I'll find
> out when my message comes back.
>
>  Needless to say, the cookie-getting function does work and successfully
> returns the two cookies:
>  metaweb-user and metaweb-user-info.
>
>  -----------------------
>  Originally I wasn't deserialising the JSON response so hence the unhelpful
> error message.
>  Now the response is:
>
>  code: /api/status/error/input/invalid
>  message: authentication required
>  ----------------------
>
>  Thanks again
>  Mark
>
>
>
>  At 16:34 06/08/2007, you wrote:
>
>
> In addition to the cookie requirement, you probably need to do your
>  cfhttp call as a POST, cfhttp is a GET by default.  If that doesn't
>  work post your cfhttp code here to the list.
>
>  On 8/6/07, Mark CE <markce at btclick.com> wrote:
>  >
>  >
>  >  Hello there,
>  >  Has anyone successfully retrieved a query result from Freebase using
>  > Coldfusion CFHTTP?
>  >  Or know of a reason why mine would return a 400 error?
>  >
>  >  HTTP/1.0 400 Bad Request X-Metaweb-Cost: dt=0.001, nreqs=0 Date: Fri, 03
>  > Aug 2007 16:10:49 GMT X-Metaweb-TID:
>  > cache;cache01.p01.sfo1:8101;2007-08-03T16:10:49Z;0002
>  > Server: Apache/2.0.58 Vary: Accept-Encoding Cache-Control: no-cache
>  > Content-Type: applic
>  >
>  >  If instead of CFHTTP I get my coldfusion code to output the URL to the
>  > page; I copy and paste into the address bar, I get a 200 response... and
> the
>  > query results I would expect.
>  >
>  >  Working code samples gratefully received!!!
>  >  Thanks
>  >  Mark CE
>  >
>  >
>  >
>  >  ________________________________
>  >  Mark Christian-Edwards
>  >  markce at btclick.com
>  >
>  >
>  >
>  >
>  > _______________________________________________
>  > Developers mailing list
>  > Developers at freebase.com
>  > http://lists.freebase.com/mailman/listinfo/developers
>  >
>  >
>
>
>
>  --
>  No virus found in this incoming message.
>  Checked by AVG Free Edition.
>  Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 05/08/2007
> 16:16
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 05/08/2007
> 16:16
>
>
>


More information about the Developers mailing list