Hard to say what's going on without knowing more. This may not be related 
to your problem, but when you iterate over request.post_vars (or any 
dictionary-like object), you are iterating over the keys, not the values. 
Also, there is no guarantee regarding the order of the keys, so 
fieldKeys[0] could be any of the keys.

Anthony

On Thursday, May 22, 2014 4:44:52 PM UTC-4, Cory wrote:
>
> Hi,
> I have a url that is supposed to receive a post request that contains xml. 
> This post request is a callback from an api. 
> For some reason the post request cannot connect to the url I have 
> specified. The view that is supposed to 
> receive the request only contains 
>
>     fieldKeys = []
>     if request.post_vars:
>         for value in request.post_vars:
>             fieldKeys.append(value)
>             if fieldKeys[0]:
>                 db.test_post.insert(field1 = fieldKeys[0])
>
> I just do this for testing purposes to see if I receive the post at all. 
> when I make a post request to myself I end up getting the 
> post variables fine.
>
> Does anyone know any possible reasons on why a post 
> request from a 3rd party would not connect to a valid
> url with the above code?
>
> thanks 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to