Paw App中带有多个-d参数的Curl命令

时间:2016-04-03 15:33:31

标签: curl scrapy scrapyd paw-app

考虑以下情况"适用于我"卷曲命令:

curl http://192.168.2.131:6800/schedule.json -d project=a -d spider=b

我不知道如何在Paw中执行此POST。 Paw中的curl导入器将其转换为一个body参数:project=a&spider=b curl导出器转换为:curl -X "POST" "http://192.168.2.131:6800/schedule.json" \ -H "Content-Type: text/plain" \ -d "project=a&spider=b"

但是,服务器部件不允许接受Paw或导出的Curl命令。它需要两个-d参数。 如果你想知道哪些东西接受这些命令,那就是Scrapy守护进程:scrapyd

所以问题是如何在Paw中执行两个(或更多)-d参数?

1 个答案:

答案 0 :(得分:1)

如果使用curl设置单独的-d参数,则会自动指示curl添加正确的/** * Creates a new JPEG Image XObject from a Buffered Image. * @param document the document where the image will be created * @param image the buffered image to embed * @return a new Image XObject * @throws IOException if the JPEG data cannot be written */ public static PDImageXObject createFromImage(PDDocument document, BufferedImage image) /** * Creates a new JPEG Image XObject from a Buffered Image and a given quality. * The image will be created at 72 DPI. * @param document the document where the image will be created * @param image the buffered image to embed * @param quality the desired JPEG compression quality * @return a new Image XObject * @throws IOException if the JPEG data cannot be written */ public static PDImageXObject createFromImage(PDDocument document, BufferedImage image, float quality) /** * Creates a new JPEG Image XObject from a Buffered Image, a given quality and DPI. * @param document the document where the image will be created * @param image the buffered image to embed * @param quality the desired JPEG compression quality * @param dpi the desired DPI (resolution) of the JPEG * @return a new Image XObject * @throws IOException if the JPEG data cannot be written */ public static PDImageXObject createFromImage(PDDocument document, BufferedImage image, float quality, int dpi) 标头。在第二个“组合”curl命令中,对你不起作用,你明确地将内容类型设置为纯文本,我认为这不是scrapyd所期望的。

在Paw中,请确保使用表单URL编码并在“正文”构造面板中单独添加两个参数。

enter image description here