tufanv Expert Licensed User Longtime User Apr 1, 2017 #1 Hello, What is the difference with poststring and postbyte while sennding a post request ? For example my payload includes non utf8 chars like turkish charachters so should i post bytes instead of string or does it have nothing to do with that ? I would be happy if someone can clearify this for me?
Hello, What is the difference with poststring and postbyte while sennding a post request ? For example my payload includes non utf8 chars like turkish charachters so should i post bytes instead of string or does it have nothing to do with that ? I would be happy if someone can clearify this for me?
Erel B4X founder Staff member Licensed User Longtime User Apr 2, 2017 #2 PostString code: Code: Copy Public Sub PostString(Link As String, Text As String) PostBytes(Link, Text.GetBytes("UTF8")) End Sub If you need to send text with a different encoding then use PostBytes with the correct encoding. Upvote 0
PostString code: Code: Copy Public Sub PostString(Link As String, Text As String) PostBytes(Link, Text.GetBytes("UTF8")) End Sub If you need to send text with a different encoding then use PostBytes with the correct encoding.
tufanv Expert Licensed User Longtime User Apr 2, 2017 #3 I am trying to implement a payment system into the app. The company send me a php file which uses curl to post to their https. The php works without problem but when i send with httpjob pos i always get a "hash mismatch" error . Hash is calculated as the byte length of the values of the payload&the value. I have to send the cc and other info directly to their remote url not to the php file so i cant use the php. I cross check with the php , send exactly the same variables , the found hash is same with the php file, curl operation results with success but httpjob always returns hash mismatch. I tought maybe i am sending wrong but according to your answer it is not wrong. It is really interesting tha curl succeeds but httpjob not. I can't find where the problem is. Erel said: PostString code: Code: Copy Public Sub PostString(Link As String, Text As String) PostBytes(Link, Text.GetBytes("UTF8")) End Sub If you need to send text with a different encoding then use PostBytes with the correct encoding. Click to expand... Upvote 0
I am trying to implement a payment system into the app. The company send me a php file which uses curl to post to their https. The php works without problem but when i send with httpjob pos i always get a "hash mismatch" error . Hash is calculated as the byte length of the values of the payload&the value. I have to send the cc and other info directly to their remote url not to the php file so i cant use the php. I cross check with the php , send exactly the same variables , the found hash is same with the php file, curl operation results with success but httpjob always returns hash mismatch. I tought maybe i am sending wrong but according to your answer it is not wrong. It is really interesting tha curl succeeds but httpjob not. I can't find where the problem is. Erel said: PostString code: Code: Copy Public Sub PostString(Link As String, Text As String) PostBytes(Link, Text.GetBytes("UTF8")) End Sub If you need to send text with a different encoding then use PostBytes with the correct encoding. Click to expand...
victormedranop Well-Known Member Licensed User Longtime User Oct 16, 2017 #4 HI Mr. tufanv did you resolve the issue? I have the same problem. Victor Medrano Upvote 0