Postman Pre-request Script

ปิด โพสต์แล้ว 5 ปีที่ผ่านมา ชำระเงินเมื่อจัดส่ง
ปิด ชำระเงินเมื่อจัดส่ง

Hello everyone, the requirements is straight forward.

If you know how to create a simple postman script, I need your help.

Currently we are calculating the hmac manually to test using postman, I want to create "Environment" pre-request script that make few variables possible.

The url currently looks like this:

localhost:9000/api/v1/location?signature=9e60283fae31c5abc37714a8d3fe17b8ea4e428974767d9abc2c1ccf98db7db7

Signature is calculated using (api-key + timestamp) and applies hmac256 to it.

So the above signature for example is a result of

apikey of (turbymwmxpzebranm2fzemx2jozvvhodhburrmhr)

and timestamp of (1531004371)

and finally the secret key is (6e50faa44614f8ad4e1a4212ba69bc03df99b19115559d97cb9d1373646c7555)

You can test this here: [login to view URL]

Our target is to be able to make the following variables available in postman:

{{hmacAuthHeaderSignature}}

{{timestamp}}

{{apikey}}

{{placeholder for any other extra variable}}

So in the url example above it would be:

localhost:9000/api/v1/location?signature={{hmacAuthHeaderSignature}}

Thank you in advance

Correction for the example above:
secret key is: (j1egzakyjgxcaglvz2rwpgcommk3ttftenmketm3)

Resulted signature would be: (6e50faa44614f8ad4e1a4212ba69bc03df99b19115559d97cb9d1373646c7555)

API JavaScript

หมายเลขโปรเจค: #17314459

เกี่ยวกับโปรเจกต์

4 ข้อเสนอ โปรเจกต์ระยะไกล ใช้งาน %project.latestActivity_relativeTime|แทนที่%

freelancer 4 คน กำลังเสนอราคาในงานนี้ โดยมีราคาเฉลี่ยอยู่ที่ $61

caww5

Hi No problems i can do it Please show me your code to check it I will help you for 1 day - for some hours

$100 CAD ใน 1 วัน
(10 รีวิว)
4.5
shapelessds

Highly dedicated, experienced Full-Stack developer. Skills: 1. 2 years of experience working with Javascript, both Back-End(Node.js) and Front-End. 2. Experience with writing variable scripts using JS. 3. Experie เพิ่มเติม

$15 CAD ใน 2 วัน
(3 รีวิว)
2.5