Need help with #PB_HTTP_Pos

Just starting out? Need help? Post your questions and find answers here.
ehbarba
Posts: 31
Joined: Thu Mar 29, 2018 2:20 am

Need help with #PB_HTTP_Pos

Post by ehbarba »

What was working fine with #PB_HTTP_Get, now is not working with #PB_HTTP_Post

If parameters are sent in Param variable, HTTPRequest callback comes with Success=False

If parameters are sent in the Header Map, I can not see them in the server

I really need some help here!

How (in what server system variable,...) to get parameters that where sent in the Header Map?

a PHP sample receiving Header Map parameters would be great to try it in my server.

Thanks

Ezequiel
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: Need help with #PB_HTTP_Pos

Post by Paul »

Why don't you post your code that is not working?
User avatar
SparrowhawkMMU
Posts: 281
Joined: Wed Aug 19, 2015 3:02 pm
Location: United Kingdom

Re: Need help with #PB_HTTP_Pos

Post by SparrowhawkMMU »

Re getting request headers in PHP, see: https://secure.php.net/manual/en/functi ... eaders.php

Without seeing your SB code, it's hard to advise further.

However, as it worked with GET, it sounds like you have a CORS issue. Search these forums for numerous examples of how to set the allow origin response header.

Remember that your dev SB is running in its own little web server, using a different port to your backend. So as far as the back end is concerned, the origin does not match the host.

I'm out and about right now, otherwise I'd post some example code, but search the forums : as I say, this problem is probably CORS related.
ehbarba
Posts: 31
Joined: Thu Mar 29, 2018 2:20 am

Re: Need help with #PB_HTTP_Pos

Post by ehbarba »

Thanks for your answers.

Best regards

Ezequiel
Post Reply