1 Replies - 504 Views - Last Post: 01 February 2013 - 03:15 PM

#1 g37752  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 195
  • Joined: 24-July 12

curl post to jQuery

Posted 30 January 2013 - 10:17 PM

i am having problems using cURL to submit a jQuery.

Live Http headers show:
http://www.domain.com/xxx/post/update

POST /xxx/post/update HTTP/1.1
Host: www.domain.com
User-Agent: Mozilla/5.0 ..
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://www.domain.com/...
Content-Length: 560
Cookie: ....
Pragma: no-cache
Cache-Control: no-cache
  {"var1":"val1","var2":"val2","var3":"val3"...}


if I use http://www.domain.com/xxx/post/update as the destination URL (to send request to), it gives me access denied, regardless of what headers or data I send.

if i use destination URL:
http://www.domain.co...l2&var3=val3...

with headers:
-H "Accept: application/json`, text/javascript`, */*; q=0.01" -H "Content-Type: application/json; charset=UTF-8" -H "X-Requested-With: XMLHttpRequest"


I get no response from the server?

Is This A Good Question/Topic? 0
  • +

Replies To: curl post to jQuery

#2 g37752  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 195
  • Joined: 24-July 12

Re: curl post to jQuery

Posted 01 February 2013 - 03:15 PM

i suppose multiple "-H" will not override, they will just append right?

i have put almost everything i see in Live Http headers (LHH) in the request, except for the cookies.

i dont understand why the destination URL from LHH gives me access denied?

anybody?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1