简体   繁体   English

从邮递员复制剪贴板中的数据

[英]Copy data from clipboard in postman

I use Postman a lot to test APIs. 我使用Postman来测试API。 In addition, to authorize those tests I have to execute a program which generates a long signature which then, I copy and paste in Header. 另外,为了授权那些测试,我必须执行一个生成长签名的程序,然后,我在Header中复制并粘贴。 For one or two tests, it doesn't seem too much; 对于一两次测试,它似乎并不太多; but doing it for multiple APIs and like multiple times makes it really hectic and stupid. 但是为多个API做多次这样做会让它变得非常繁忙和愚蠢。

Out of curiosity, I want to do this whole process automatically. 出于好奇,我想自动完成整个过程。 I am able to copy that signature in clipboard(Using Toolkit and Clipboard in Java), but the issue is I don't know how to get from clipboard in Postman's pre-request script. 我能够在剪贴板中复制该签名(使用Java中的工具包和剪贴板),但问题是我不知道如何从Postman的预请求脚本中获取剪贴板。 I don't really know if it's possible or not. 我真的不知道它是否可能。 I apologize in advance if it's redundant or seems a bit stupid, because I haven't really found anything so far and it's purely my curiosity. 如果它多余或者看起来有点愚蠢,我会事先道歉,因为到目前为止我还没有找到任何东西,这纯粹是我的好奇心。 Thanks in advance!!! 提前致谢!!!

I use swagger.io instead postman for this issues. 我使用swagger.io代替邮递员来解决这个问题。 It allows to create really useful query interface for code documentation, testing and API inspecting. 它允许为代码文档,测试和API检查创建非常有用的查询接口。 http://editor.swagger.io/#!/ http://editor.swagger.io/#!/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM