0
Votes
Undo
  1. SHAMEEM KAKKAD
  2. PowerBuilder
  3. Tuesday, 30 August 2022 10:48 AM UTC

Hai,

When I use this postman to send the data through API, database accepting all data.

But, When I am use powerbuilder http method, database inserting a row without data (with 200 responsecode). what is the wrong in my code ?

Below my script

jsoncontent_ = '"patient_first_name": "'+patient_first_name+'",'+&
'“patient_middle_name”: “'+patient_middle_name+'”,'+&
'“patient_last_name”: “'+patient_last_name+'”

shahttpclient.SetRequestHeader("Content-Type", "form-data")

res_ = shahttpclient.SendRequest('POST', link_,jsoncontent_)

 

René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 30 August 2022 11:36 AM UTC
  2. PowerBuilder
  3. # 1

Look at the RAW data that Postman send to the server to see the differences.

Comment
  1. SHAMEEM KAKKAD
  2. Tuesday, 30 August 2022 11:38 AM UTC
Thanks.



I modified like below..



shahttpclient.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")

res_ = shahttpclient.SendRequest('POST', link_,'patient_first_name=test name)











Now it is working....

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.