Questions tagged [raw-post]

13 questions
12
votes
2 answers

PHP CURL Using POST Raw JSON Data

I am working with PHP curl for post, for some reason I couldn't post the form successfully. $ch = curl_init(); $headers = [ 'x-api-key: XXXXXX', 'Content-Type: text/plain' ]; $postData = array ( 'data1: value1', …
4
votes
1 answer

How read HTTP raw POST data in PHP

The remote server periodically queries to my PHP page via HTTP HEAD (check only KeepAlive - this works). If the remote server registers a trigger, sends me the XML format with the data (in POST raw format). I can not find where the mistake is or…
czWolfHunter
  • 387
  • 2
  • 5
  • 17
3
votes
1 answer

How do I get Violation Report (JSON DATA) for Content Security Policy using PHP?

One helpful feature of Content Security Policy is ability to detect violations and sending it to specific URI as (Violation Report). According to documentation from CSP 1.1 Sec. 3.2.4 Reporting: To send violation reports, the user agent must use an…
user1646111
2
votes
1 answer

Save raw_post_data to FileField using Django

I need to save some Raw Post Data (request.raw_post_data) straight to a FileField using Python/Django. All the information I have found so far is not helpful for saving RAW data. More specifically, the raw data is the wave data recorded from a Mic…
Lyle Pratt
  • 5,636
  • 4
  • 27
  • 28
2
votes
1 answer

Ruby Sinatra simple app - Raw POST Data

I'd like to setup a simple Sinatra app up to capture the raw POST data that gets sent to the the / URL and save this data to the file system as a file with the format YYYYMMDD-HHMMSS.json. The data I will be posting to the URL with be simple text…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
2
votes
1 answer

Read UTF-8 SOAP request through php://input

I'm working on a simple listener for an external node talking SOAP to it. In addition to simple requests, node sends MultiPart messages as well, hence not allowing me to use any PHP SOAP libraries (if you know of any dealing with MultiPart messages,…
David Kuridža
  • 7,026
  • 5
  • 26
  • 25
1
vote
0 answers

FFMPEG progress url to php script

I'm trying to save the information that ffmpeg sends to the php script but it doesn't work: // progress.php ignore_user_abort(true); $json = file_get_contents('php://input'); if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1' ||…
michel
  • 11
  • 3
1
vote
2 answers

How can I send a raw JSON using PHP curl with the content type "application/x-www-form-urlencoded"?

How can I send a raw JSON using PHP curl with a content type of application/x-www-form-urlencoded? Let me explain: I’m communicating with a webserver that accepts HTTP POST requests with a JSON object as the body of the request where normally we are…
Lothre1
  • 3,523
  • 7
  • 43
  • 64
1
vote
2 answers

Getting IP address of a client who sent a cURL request with JSON raw POST data

I'm dealing with Flight Search API for my clients. I want to restrict some client requests from some IP Address who didn't registered with me. All the IP Addresses of my clients I will save them in a DB. Now a user sent me a RAW HTTP POST jSON data…
0
votes
2 answers

RawPostException: You cannot access body after reading from request's data stream

I am trying to get the data from ajax to django post view, I create the cart with items now I need to get the cart to backend My js code is: $.ajax({ url: url, type: "POST", data: JSON.stringify({'order_data':order}), contentType:…
0
votes
0 answers

Error: How to send raw JSON body in Retrofit Post Request

I am getting following error: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 2 path $ I am using following code: In Application Class: public static void…
user1288005
  • 890
  • 2
  • 16
  • 36
0
votes
0 answers

PHP $HTTP_RAW_POST_DATA always null

I'm sending raw image data from flash to php. However the $HTTP_RAW_POST_DATA always comes up as null. I tried also using file_get_contents('php://input') to no avail. I also made sure that always_populate_raw_post_data is set to On. I also check…
LoneWolfPR
  • 3,978
  • 12
  • 48
  • 84
0
votes
1 answer

Reading RAW data from a Flash POST Request ( images )

I'm basically interacting with a third party API flash file to send HTTP POST requests to my server. I know I'm on somewhat the right path because it requires a crossdomain.xml file, and before I added that part nothing in the POST variables was…
meder omuraliev
  • 183,342
  • 71
  • 393
  • 434