2017-07-03 4 views
1

私はPostmanでうまく動作する非常に簡単なPostmanリクエストを持っています。これは、次のURLにちょうどGETリクエストです:リクエストはPostmanからではなく、cURLからではありません

http://www.toysrus.com/storefrontsearch/stores.jsp?skuId=24654884&quantity=1&postalCode=48103&latitude&longitude&productId=107531766&startIndexForPagination=0&searchRadius=0&pageType=product&ispu_or_sts=null&displayAllStoresFlag=false&displayAllStoreLink=false

私は私のためにそれのうちcURLの要求を行うポストマンを依頼した場合、それは私にこれを与える:

curl -X GET \ 'http://www.toysrus.com/storefrontsearch/stores.jsp?skuId=24654884&quantity=1&postalCode=48103&latitude=&longitude=&productId=107531766&startIndexForPagination=0&searchRadius=0&pageType=product&ispu_or_sts=null&displayAllStoresFlag=false&displayAllStoreLink=false' \ -H 'cache-control: no-cache' \ -H 'postman-token: b4ae79c0-c3f0-8247-8c2f-306c43376039'

結果永遠にぶら下がり、決して私に応答を与えないということです。

cURLリクエストを取得するために何ができるのでしょうか?

+0

アップデート:私は、GETリクエストがポストマンでうまく動作することを発見私は少し問題を単純化すると信じています。 –

+0

それから、カール線から '-X GET'を取り除いてください... –

+0

私の言ったように、私の' curl'コマンドはPostmanからちょうど来ています。私はコマンドが '-X GET'が存在するかどうかに関わらずコマンドが機能的に同等であると推測し、それを削除することで何も変わらないと推測します。 (私は '-X GET'を使わずにコマンドを試してみましたが、私は狂気ではないと確信しており、要求は同じように失敗するようです。) –

答えて

2

それ以外の場合は、404返し設定する必要がtroute=t1もクッキー、サーバはカールユーザーエージェントを禁止しているようだ:

curl -L -H 'User-Agent: Mozilla' \ 
     -H 'Cookie: troute=t1;' \ 
     'http://www.toysrus.com/storefrontsearch/stores.jsp?skuId=24654884&quantity=1&postalCode=48103&latitude&longitude&productId=107531766&startIndexForPagination=0&searchRadius=0&pageType=product&ispu_or_sts=null&displayAllStoresFlag=false&displayAllStoreLink=false' --compressed 
+0

チケットのようです。ありがとう! –

関連する問題