Hey David,
What I was referring to was the tester interface actually inside the
admin area - I noticed that the "method" selected in that interface is
passed on as a GET parameter when running the test, so the tests don't
actually use HTTP POST or anything.
Any reason why my jQuery example shouldn't work though? It returns a
500 error if I point it to some wrong URL on the API server, but
doesn't do anything if I point it to the correct url...
One other thing I'm noticing is that the URL pointing to the /public
FRAPI folder actually returns a 500 error, instead of some basic XML
message as suggested by the documentation - is that outdated
information or is something wrong on my server?
So you have an office here just for FRAPI? Or is that together with
something else? :)
Cheers,
Martin
On Mar 22, 4:56 pm, David Coallier <
dav...@php.net> wrote:
> > I actually have cross domain requests allowed in the configuration, so
> > that shouldn't be it.
>
> > Also, what do you mean this is not how FRAPI works? In my mind it's
> > very confusing when the documentation talks about get, post, etc.
> > methods, but in the end it's always using GET and the "method" is just
> > a parameter of that, or?
>
> Hi there Martin,
>
> I'm not sure what you mean by in the end it's always using GET. If you
> want to test the POST, GET, PUT handling, you can do it by defining a
> simple executePost(), executeGet() and executePut() in your action and
> then invoking it like:
>
> $> curl -X POSThttp://api.frapi/actionname-d '' -H 'Accept: application/json'
> $> curlhttp://api.frapi/actionname-H 'Accept: application/xml'
> $> curl -X PUThttp://api.frapi/actionname-H 'Accept: application/xml' -d ''