Reputation: 1
Hi I have an application that works fine when I type the url from the browser. it works something like http://mysite/service?id=1234, if I type that on the browser it works fine, however we have another service that accepts parameters from a mobile phone, this service would then call the same url, and post the parameter onto it.
I know it gets as far as urls.py bacause I've put a logging mechanism there, but it doesn't quite make it into the views, i have a logging bit in the view as well.
so that's why I wanted to get the exact request path that the urls.py recieves for me to be able to figure out if the service is screwing something up.
is this possible at all?
Upvotes: 0
Views: 363
Reputation: 1295
Judging from your urls.py: If the view that isn't hit is the ws one, have you tried
(r'^ws$','www.views.ws'),
You forgot to include the urls are you testing with, so it's hard to say.
If you're on a unixy system I recommend kodos to test out the regular expression of an urlpattern against an actual url.
Upvotes: 0
Reputation: 882551
When you say post, do you mean post, or are you using this crucial, extremely specific verb randomly? Because if the request is indeed a post, there will most likely be no ?id=1234
as part of the URL -- the parameters will instead go in the body of the post; the query-string part of the URL is normally used only for GET requests, not POST requests.
Then again, it is quite possible that you're just using extremely specific verbs randomly, since you do say "call the url" which is guaranteed nonsense (one "calls" a function: there is no concept at all of "calling a URL" in the operation of the web;-)... but I'm giving you the benefit of the doubt since, just in case you're using technical terminology correctly, the use of POST would in fact totally explain why the query-string part of the URL, which apparently you expect to be present, might instead most likely be totally absent (with the parameters info transmuted instead into a post-body!).
Upvotes: 2