How to pass SSL cert and key in Gatling Script - gatling

I have to create one script in gatling where I need to pass ssl CERT AND KEY.Curl is in below format.I am not sure how to pass it in my simulation .Can someone please help.
curl -E abc.crt --key cde.key --location --request POST 'https://a/b' \
--header 'Content-Type: application/json'

Related

unable to upload csv file in postman using salesforce bulk api 2.0

I am facing problem uploading csv file with postman using bulk api 2.0 basically, I am using Postman, but the csv file doesn't seem to upload correct. however, if I use workbench, it works.
the curl from postman looks like this
curl --location --request PUT 'https://bonuspoint-dev-ed.my.salesforce.com/services/data/v55.0/jobs/ingest/7505g00000CTs5pAAD/batches'
--header 'Accept: application/json'
--header 'X-PrettyPrint: 1'
--header 'Content-Type: text/csv'
--header 'Authorization: Bearer 00D5g000005GHBP!ARUAQJLq22f.uDZXp_cWTaKrVImIPtxkcW3VIxyZ0RNZ_BXG9hBMniPg34ezDUBcDTgB6.K0ropfNKV1w1EFOo4I7OxPxaX_'
--header 'Cookie: BrowserId=k-EBPmwsEeyXmPs9yu0SNQ; CookieConsentPolicy=0:1; LSKey-c$CookieConsentPolicy=0:1'
--data-binary '#uploaddatafile.csv'

Failed to add a new replica to SiriDB

My Set-up
I've started two SiriDB server on the same node, but using different ports:
First server:
server_name: %HOSTNAME:9010
listen_client_port: 9000
http_api_port: 9020
Second server:
server_name: %HOSTNAME:9011
listen_client_port: 9001
http_api_port: 9021
Situation
I've created a new replica using the following curl command:
curl --location --request POST 'http://localhost:9021/new-replica' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic c2E6c2lyaQ==' \
--header 'Content-Type: text/plain' \
--data-raw '{
"dbname": "dbtest",
"username": "iris",
"password": "siri",
"host": "localhost",
"port": 9000,
"pool": 0
}'
The response from the command above was OK.
But in the server logging I see the following error message:
Connecting to back-end server 'my-hostname-xxx:9010' failed (error: connection refused)
When performing a list servers query, it seems that the servers are not able to find each other:
curl --location --request POST 'http://localhost:9021/query/dbtest' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic aXJpczpzaXJp' \
--header 'Content-Type: text/plain' \
--data-raw '{"q": "list servers"}'
This is the response:
{"columns":["status"],"servers":[["offline"],["running | synchronizing"]]}
I can't find what's wrong, as the servers run on the same host. Therefore, they should be able to find each other right?
Most likely your binding is incorrect. Can you check if this is the case?
By default SiriDB binds only to 127.0.0.1 (localhost) for security reasons.
Since %HOSTNAME is used, it might be so that SiriDB is listening on another interface.
If you are using a configuration file, you probably need to change both bind_server_address and bind_client_address to :: (any).
Note: the same setting can be done using the environment variable SIRIDB_BIND_SERVER_ADDRESS and SIRIDB_BIND_CLIENT_ADDRESS.

Authenticated Rest calls in Zeppelin

I have enables authentication in Zeppelin. I am able to authenticate Zeppelin from curl:
curl -i --data 'userName=admin&password=admin' -X POST http://ip_address:port/api/login
It is giving me response properly with JSESSIONID.
How can I use the same session in my next API calls like
http://ip_address:port/api/notebook
Thanks.
Write the response cookies to local file during login api call
curl -c cookies.txt -i --data 'userName=admin&password=admin' -X POST http://ip_address:port/api/login
and pass the cookies to next API calls
curl -b cookies.txt http://ip_address:port/api/notebook
Example for run note
curl -i -b 'JSESSIONID=ad51301f-a13b-4b8d-a6c7-b684dc453f8f; Path=/; HttpOnly' -X POST -H "Content-Type: application/json" http://ip_address:port/api/notebook/job/note_id

Access Coinbase Create Account API using curl without OAuth2

I am using Coinbase Wallet Endpoints of Coinbase API in my application and trying to hit create_account API https://developers.coinbase.com/api/v2#create-account using curl without OAuth2. According to Coinbase documentation, curl command would be like:
curl https://api.coinbase.com/v2/accounts \
-X POST
-H 'Content-Type: application/json'
-H 'Authorization: Bearer
abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'
-d '{"name": "New wallet"}'
I am unable to figure out what will be the value of access token and how I will get it without using OAuth2 request.
Please guide me that "How I will get Bearer access token without using OAuth2?".

Payment APIs without server-side requirements

Are there any Payment APIs, preferably in Javascript/Angular that can be directly used on the client side, and thus require no server side implementation?
The best example is Stripe. It both requires setting up the client side (Checkout and retrieval of StripeToken) and then actually processing the payment on the server (Charge).
I found a service that allows you to process Stripe payments without setting up the server-side yourself: Noodlio Pay.
You simply send HTTP requests to the API hosted on Mashape.
Here is an example of a request in cURL:
curl -X POST --include 'https://noodlio-pay.p.mashape.com/charge/token'
\ -H 'X-Mashape-Key: <required>'
\ -H 'Content-Type: application/x-www-form-urlencoded'
\ -H 'Accept: application/json'
\ -d 'amount=100'
\ -d 'currency=usd'
\ -d 'description=Purchase with Noodlio Pay'
\ -d 'source=tok_181ER0E9p71uHfeG90clN2MH'
\ -d 'stripe_account=acct_12abcDEF34GhIJ5K'

Resources