LinQR
LinQRv2.0
This is LinQR QR Code API documentation. This API allows you to generate custom, visually attractive QR Codes. The cloud infrastructure guarantees high availability and autoscalability of the service. You can generate hundreds of thousands of images this way and use them however you like. We realize that your API use case may require custom solutions, and perhaps we lack functionality that is very important to you. In that case feel free to write an email to our support and tell us about it. We have repeatedly added new functions of our service directly after the requests of our users…
- Endpoints
- 14 (11 POST, 2 GET, 1 DELETE)
- Base URL
https://run.byvalue.org- Authentication
- API key
- Spec format
- OpenAPI 3.0.2
- API version
- 2.0
- Source
- linqr.app
- Provider
- linqr.app
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttps://run.byvalue.org) and your API key credentials, then send requests.
DELETE
Delete image
{{baseUrl}}/images/:id
HEADERS
X-RapidAPI-Key
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/images/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-rapidapi-key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/images/:id" {:headers {:x-rapidapi-key "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/images/:id"
headers = HTTP::Headers{
"x-rapidapi-key" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/images/:id"),
Headers =
{
{ "x-rapidapi-key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/images/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-rapidapi-key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/images/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-rapidapi-key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/images/:id HTTP/1.1
X-Rapidapi-Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/images/:id")
.setHeader("x-rapidapi-key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/images/:id"))
.header("x-rapidapi-key", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/images/:id")
.delete(null)
.addHeader("x-rapidapi-key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/images/:id")
.header("x-rapidapi-key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/images/:id');
xhr.setRequestHeader('x-rapidapi-key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/images/:id',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/images/:id';
const options = {method: 'DELETE', headers: {'x-rapidapi-key': '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/images/:id',
method: 'DELETE',
headers: {
'x-rapidapi-key': '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/images/:id")
.delete(null)
.addHeader("x-rapidapi-key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/images/:id',
headers: {
'x-rapidapi-key': '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/images/:id',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/images/:id');
req.headers({
'x-rapidapi-key': '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/images/:id',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/images/:id';
const options = {method: 'DELETE', headers: {'x-rapidapi-key': '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-rapidapi-key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/images/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/images/:id" in
let headers = Header.add (Header.init ()) "x-rapidapi-key" "{{apiKey}}" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/images/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-rapidapi-key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/images/:id', [
'headers' => [
'x-rapidapi-key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/images/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/images/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/images/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/images/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'x-rapidapi-key': "{{apiKey}}" }
conn.request("DELETE", "/baseUrl/images/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/images/:id"
headers = {"x-rapidapi-key": "{{apiKey}}"}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/images/:id"
response <- VERB("DELETE", url, add_headers('x-rapidapi-key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/images/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-rapidapi-key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/images/:id') do |req|
req.headers['x-rapidapi-key'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/images/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-rapidapi-key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/images/:id \
--header 'x-rapidapi-key: {{apiKey}}'
http DELETE {{baseUrl}}/images/:id \
x-rapidapi-key:'{{apiKey}}'
wget --quiet \
--method DELETE \
--header 'x-rapidapi-key: {{apiKey}}' \
--output-document \
- {{baseUrl}}/images/:id
import Foundation
let headers = ["x-rapidapi-key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/images/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
List all images
{{baseUrl}}/images
HEADERS
X-RapidAPI-Key
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/images");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-rapidapi-key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/images" {:headers {:x-rapidapi-key "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/images"
headers = HTTP::Headers{
"x-rapidapi-key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/images"),
Headers =
{
{ "x-rapidapi-key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/images");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-rapidapi-key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/images"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/images HTTP/1.1
X-Rapidapi-Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/images")
.setHeader("x-rapidapi-key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/images"))
.header("x-rapidapi-key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/images")
.get()
.addHeader("x-rapidapi-key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/images")
.header("x-rapidapi-key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/images');
xhr.setRequestHeader('x-rapidapi-key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/images',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/images';
const options = {method: 'GET', headers: {'x-rapidapi-key': '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/images',
method: 'GET',
headers: {
'x-rapidapi-key': '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/images")
.get()
.addHeader("x-rapidapi-key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/images',
headers: {
'x-rapidapi-key': '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/images',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/images');
req.headers({
'x-rapidapi-key': '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/images',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/images';
const options = {method: 'GET', headers: {'x-rapidapi-key': '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-rapidapi-key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/images"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/images" in
let headers = Header.add (Header.init ()) "x-rapidapi-key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rapidapi-key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/images', [
'headers' => [
'x-rapidapi-key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/images');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/images');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/images' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/images' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'x-rapidapi-key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/images", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/images"
headers = {"x-rapidapi-key": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/images"
response <- VERB("GET", url, add_headers('x-rapidapi-key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/images') do |req|
req.headers['x-rapidapi-key'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/images";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-rapidapi-key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/images \
--header 'x-rapidapi-key: {{apiKey}}'
http GET {{baseUrl}}/images \
x-rapidapi-key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'x-rapidapi-key: {{apiKey}}' \
--output-document \
- {{baseUrl}}/images
import Foundation
let headers = ["x-rapidapi-key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/images")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"id": "b550f00b-c9b2-4352-8769-679bc504cf42",
"size": 13212,
"source": "example.png"
}
]
GET
List image
{{baseUrl}}/images/:id
HEADERS
X-RapidAPI-Key
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/images/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-rapidapi-key: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/images/:id" {:headers {:x-rapidapi-key "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/images/:id"
headers = HTTP::Headers{
"x-rapidapi-key" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/images/:id"),
Headers =
{
{ "x-rapidapi-key", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/images/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-rapidapi-key", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/images/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/images/:id HTTP/1.1
X-Rapidapi-Key: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/images/:id")
.setHeader("x-rapidapi-key", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/images/:id"))
.header("x-rapidapi-key", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/images/:id")
.get()
.addHeader("x-rapidapi-key", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/images/:id")
.header("x-rapidapi-key", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/images/:id');
xhr.setRequestHeader('x-rapidapi-key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/images/:id',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/images/:id';
const options = {method: 'GET', headers: {'x-rapidapi-key': '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/images/:id',
method: 'GET',
headers: {
'x-rapidapi-key': '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/images/:id")
.get()
.addHeader("x-rapidapi-key", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/images/:id',
headers: {
'x-rapidapi-key': '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/images/:id',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/images/:id');
req.headers({
'x-rapidapi-key': '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/images/:id',
headers: {'x-rapidapi-key': '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/images/:id';
const options = {method: 'GET', headers: {'x-rapidapi-key': '{{apiKey}}'}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-rapidapi-key": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/images/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/images/:id" in
let headers = Header.add (Header.init ()) "x-rapidapi-key" "{{apiKey}}" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/images/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rapidapi-key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/images/:id', [
'headers' => [
'x-rapidapi-key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/images/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/images/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/images/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/images/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'x-rapidapi-key': "{{apiKey}}" }
conn.request("GET", "/baseUrl/images/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/images/:id"
headers = {"x-rapidapi-key": "{{apiKey}}"}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/images/:id"
response <- VERB("GET", url, add_headers('x-rapidapi-key' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/images/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/images/:id') do |req|
req.headers['x-rapidapi-key'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/images/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-rapidapi-key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/images/:id \
--header 'x-rapidapi-key: {{apiKey}}'
http GET {{baseUrl}}/images/:id \
x-rapidapi-key:'{{apiKey}}'
wget --quiet \
--method GET \
--header 'x-rapidapi-key: {{apiKey}}' \
--output-document \
- {{baseUrl}}/images/:id
import Foundation
let headers = ["x-rapidapi-key": "{{apiKey}}"]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/images/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"id": "b550f00b-c9b2-4352-8769-679bc504cf42",
"size": 13212,
"source": "example.png"
}
POST
Upload image
{{baseUrl}}/images
HEADERS
X-RapidAPI-Key
{{apiKey}}
BODY multipartForm
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/images");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-rapidapi-key: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: multipart/form-data; boundary=---011000010111000001101001");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/images" {:headers {:x-rapidapi-key "{{apiKey}}"}
:multipart [{:name "image"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/images"
headers = HTTP::Headers{
"x-rapidapi-key" => "{{apiKey}}"
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/images"),
Headers =
{
{ "x-rapidapi-key", "{{apiKey}}" },
},
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "image",
}
}
},
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/images");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-rapidapi-key", "{{apiKey}}");
request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/images"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rapidapi-key", "{{apiKey}}")
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/images HTTP/1.1
X-Rapidapi-Key: {{apiKey}}
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 114
-----011000010111000001101001
Content-Disposition: form-data; name="image"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/images")
.setHeader("x-rapidapi-key", "{{apiKey}}")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/images"))
.header("x-rapidapi-key", "{{apiKey}}")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/images")
.post(body)
.addHeader("x-rapidapi-key", "{{apiKey}}")
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/images")
.header("x-rapidapi-key", "{{apiKey}}")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('image', '');
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/images');
xhr.setRequestHeader('x-rapidapi-key', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const form = new FormData();
form.append('image', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/images',
headers: {
'x-rapidapi-key': '{{apiKey}}',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
},
data: '[form]'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/images';
const form = new FormData();
form.append('image', '');
const options = {method: 'POST', headers: {'x-rapidapi-key': '{{apiKey}}'}};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const form = new FormData();
form.append('image', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/images',
method: 'POST',
headers: {
'x-rapidapi-key': '{{apiKey}}'
},
processData: false,
contentType: false,
mimeType: 'multipart/form-data',
data: form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/images")
.post(body)
.addHeader("x-rapidapi-key", "{{apiKey}}")
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/images',
headers: {
'x-rapidapi-key': '{{apiKey}}',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write('-----011000010111000001101001\r\nContent-Disposition: form-data; name="image"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/images',
headers: {
'x-rapidapi-key': '{{apiKey}}',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
},
formData: {image: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/images');
req.headers({
'x-rapidapi-key': '{{apiKey}}',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
});
req.multipart([]);
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/images',
headers: {
'x-rapidapi-key': '{{apiKey}}',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="image"\r\n\r\n\r\n-----011000010111000001101001--\r\n'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();
formData.append('image', '');
const url = '{{baseUrl}}/images';
const options = {method: 'POST', headers: {'x-rapidapi-key': '{{apiKey}}'}};
options.body = formData;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-rapidapi-key": @"{{apiKey}}",
@"content-type": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"image", @"value": @"" } ];
NSString *boundary = @"---011000010111000001101001";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/images"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/images" in
let headers = Header.add_list (Header.init ()) [
("x-rapidapi-key", "{{apiKey}}");
("content-type", "multipart/form-data; boundary=---011000010111000001101001");
] in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001",
"x-rapidapi-key: {{apiKey}}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/images', [
'headers' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
'x-rapidapi-key' => '{{apiKey}}',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/images');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}',
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="image"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/images');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-rapidapi-key' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/images' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="image"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("x-rapidapi-key", "{{apiKey}}")
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/images' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="image"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {
'x-rapidapi-key': "{{apiKey}}",
'content-type': "multipart/form-data; boundary=---011000010111000001101001"
}
conn.request("POST", "/baseUrl/images", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/images"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {
"x-rapidapi-key": "{{apiKey}}",
"content-type": "multipart/form-data; boundary=---011000010111000001101001"
}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/images"
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, add_headers('x-rapidapi-key' = '{{apiKey}}'), content_type("multipart/form-data"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rapidapi-key"] = '{{apiKey}}'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001'}
)
response = conn.post('/baseUrl/images') do |req|
req.headers['x-rapidapi-key'] = '{{apiKey}}'
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/images";
let form = reqwest::multipart::Form::new()
.text("image", "");
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-rapidapi-key", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/images \
--header 'content-type: multipart/form-data' \
--header 'x-rapidapi-key: {{apiKey}}' \
--form image=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="image"
-----011000010111000001101001--
' | \
http POST {{baseUrl}}/images \
content-type:'multipart/form-data; boundary=---011000010111000001101001' \
x-rapidapi-key:'{{apiKey}}'
wget --quiet \
--method POST \
--header 'x-rapidapi-key: {{apiKey}}' \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="image"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- {{baseUrl}}/images
import Foundation
let headers = [
"x-rapidapi-key": "{{apiKey}}",
"content-type": "multipart/form-data; boundary=---011000010111000001101001"
]
let parameters = [
[
"name": "image",
"value": ""
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/images")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"id": "b550f00b-c9b2-4352-8769-679bc504cf42",
"size": 13212,
"source": "example.png"
}
POST
QR Code Batch
{{baseUrl}}/batch/qrcode
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/batch/qrcode");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/batch/qrcode" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:items [{:data ""
:image ""
:output ""
:size ""
:style ""}]
:output ""}})
require "http/client"
url = "{{baseUrl}}/batch/qrcode"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/batch/qrcode"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/batch/qrcode");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/batch/qrcode"
payload := strings.NewReader("{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/batch/qrcode HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 141
{
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/batch/qrcode")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/batch/qrcode"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/batch/qrcode")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/batch/qrcode")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}")
.asString();
const data = JSON.stringify({
items: [
{
data: '',
image: '',
output: '',
size: '',
style: ''
}
],
output: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/batch/qrcode');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/batch/qrcode',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {items: [{data: '', image: '', output: '', size: '', style: ''}], output: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/batch/qrcode';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"items":[{"data":"","image":"","output":"","size":"","style":""}],"output":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/batch/qrcode',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "items": [\n {\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n }\n ],\n "output": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/batch/qrcode")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/batch/qrcode',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({items: [{data: '', image: '', output: '', size: '', style: ''}], output: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/batch/qrcode',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {items: [{data: '', image: '', output: '', size: '', style: ''}], output: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/batch/qrcode');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
items: [
{
data: '',
image: '',
output: '',
size: '',
style: ''
}
],
output: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/batch/qrcode',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {items: [{data: '', image: '', output: '', size: '', style: ''}], output: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/batch/qrcode';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"items":[{"data":"","image":"","output":"","size":"","style":""}],"output":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"items": @[ @{ @"data": @"", @"image": @"", @"output": @"", @"size": @"", @"style": @"" } ],
@"output": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/batch/qrcode"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/batch/qrcode" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/batch/qrcode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]
],
'output' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/batch/qrcode', [
'body' => '{
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/batch/qrcode');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'items' => [
[
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]
],
'output' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'items' => [
[
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]
],
'output' => ''
]));
$request->setRequestUrl('{{baseUrl}}/batch/qrcode');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/batch/qrcode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/batch/qrcode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/batch/qrcode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/batch/qrcode"
payload = {
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/batch/qrcode"
payload <- "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/batch/qrcode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/batch/qrcode') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"items\": [\n {\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n }\n ],\n \"output\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/batch/qrcode";
let payload = json!({
"items": (
json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
})
),
"output": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/batch/qrcode \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}'
echo '{
"items": [
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
],
"output": ""
}' | \
http POST {{baseUrl}}/batch/qrcode \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "items": [\n {\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n }\n ],\n "output": ""\n}' \
--output-document \
- {{baseUrl}}/batch/qrcode
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"items": [
[
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
]
],
"output": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/batch/qrcode")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Arbitrary data type QR Code
{{baseUrl}}/qrcode
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Contact QR Code
{{baseUrl}}/qrcode/contact
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/contact");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/contact" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/contact"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/contact"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/contact");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/contact"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/contact HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/contact")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/contact"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/contact")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/contact")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/contact');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/contact',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/contact';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/contact',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/contact")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/contact',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/contact',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/contact');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/contact',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/contact';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/contact"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/contact" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/contact', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/contact');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/contact');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/contact' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/contact' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/contact", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/contact"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/contact"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/contact') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/contact";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/contact \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/contact \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/contact
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/contact")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Cryptocurrency payment QR Code
{{baseUrl}}/qrcode/crypto
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/crypto");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/crypto" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/crypto"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/crypto"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/crypto");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/crypto"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/crypto HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/crypto")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/crypto"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/crypto")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/crypto")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/crypto');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/crypto',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/crypto';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/crypto',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/crypto")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/crypto',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/crypto',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/crypto');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/crypto',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/crypto';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/crypto"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/crypto" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/crypto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/crypto', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/crypto');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/crypto');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/crypto' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/crypto' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/crypto", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/crypto"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/crypto"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/crypto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/crypto') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/crypto";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/crypto \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/crypto \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/crypto
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/crypto")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Email QR Code
{{baseUrl}}/qrcode/email
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/email");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/email" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/email"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/email"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/email");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/email"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/email HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/email")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/email"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/email")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/email")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/email');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/email',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/email';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/email',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/email")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/email',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/email',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/email');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/email',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/email';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/email"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/email" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/email', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/email');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/email');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/email' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/email' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/email", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/email"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/email"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/email') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/email";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/email \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/email \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/email
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/email")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Geolocation QR Code
{{baseUrl}}/qrcode/geo
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/geo");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/geo" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/geo"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/geo"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/geo");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/geo"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/geo HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/geo")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/geo"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/geo")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/geo")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/geo');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/geo',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/geo';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/geo',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/geo")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/geo',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/geo',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/geo');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/geo',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/geo';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/geo"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/geo" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/geo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/geo', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/geo');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/geo');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/geo' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/geo' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/geo", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/geo"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/geo"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/geo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/geo') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/geo";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/geo \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/geo \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/geo
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/geo")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
SMS QR Code
{{baseUrl}}/qrcode/sms
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/sms");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/sms" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/sms"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/sms"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/sms");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/sms"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/sms HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/sms")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/sms"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/sms")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/sms")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/sms');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/sms',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/sms';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/sms',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/sms")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/sms',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/sms',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/sms');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/sms',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/sms';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/sms"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/sms" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/sms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/sms', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/sms');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/sms');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/sms' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/sms' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/sms", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/sms"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/sms"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/sms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/sms') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/sms";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/sms \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/sms \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/sms
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/sms")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Telephone QR Code
{{baseUrl}}/qrcode/phone
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/phone");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/phone" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/phone"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/phone"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/phone");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/phone"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/phone HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/phone")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/phone"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/phone")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/phone")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/phone');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/phone',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/phone';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/phone',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/phone")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/phone',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/phone',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/phone');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/phone',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/phone';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/phone"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/phone" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/phone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/phone', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/phone');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/phone');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/phone' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/phone' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/phone", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/phone"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/phone"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/phone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/phone') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/phone";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/phone \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/phone \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/phone
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/phone")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Text QR Code
{{baseUrl}}/qrcode/text
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/text");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/text" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/text"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/text"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/text");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/text"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/text HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/text")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/text"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/text")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/text")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/text');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/text',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/text';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/text',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/text")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/text',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/text',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/text');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/text',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/text';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/text"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/text" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/text', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/text');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/text');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/text' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/text' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/text", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/text"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/text"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/text') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/text";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/text \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/text \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/text
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/text")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
WiFi QR Code
{{baseUrl}}/qrcode/wifi
HEADERS
Byvalue-Token
{{apiKey}}
BODY json
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/qrcode/wifi");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "byvalue-token: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/qrcode/wifi" {:headers {:byvalue-token "{{apiKey}}"}
:content-type :json
:form-params {:data ""
:image ""
:output ""
:size ""
:style ""}})
require "http/client"
url = "{{baseUrl}}/qrcode/wifi"
headers = HTTP::Headers{
"byvalue-token" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/qrcode/wifi"),
Headers =
{
{ "byvalue-token", "{{apiKey}}" },
},
Content = new StringContent("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/qrcode/wifi");
var request = new RestRequest("", Method.Post);
request.AddHeader("byvalue-token", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/qrcode/wifi"
payload := strings.NewReader("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("byvalue-token", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/qrcode/wifi HTTP/1.1
Byvalue-Token: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/qrcode/wifi")
.setHeader("byvalue-token", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/qrcode/wifi"))
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/qrcode/wifi")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/qrcode/wifi")
.header("byvalue-token", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
image: '',
output: '',
size: '',
style: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/qrcode/wifi');
xhr.setRequestHeader('byvalue-token', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/wifi',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/qrcode/wifi';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/qrcode/wifi',
method: 'POST',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/qrcode/wifi")
.post(body)
.addHeader("byvalue-token", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/qrcode/wifi',
headers: {
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({data: '', image: '', output: '', size: '', style: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/wifi',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: {data: '', image: '', output: '', size: '', style: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/qrcode/wifi');
req.headers({
'byvalue-token': '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
image: '',
output: '',
size: '',
style: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/qrcode/wifi',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
data: {data: '', image: '', output: '', size: '', style: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/qrcode/wifi';
const options = {
method: 'POST',
headers: {'byvalue-token': '{{apiKey}}', 'content-type': 'application/json'},
body: '{"data":"","image":"","output":"","size":"","style":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"byvalue-token": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"data": @"",
@"image": @"",
@"output": @"",
@"size": @"",
@"style": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/qrcode/wifi"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/qrcode/wifi" in
let headers = Header.add_list (Header.init ()) [
("byvalue-token", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/qrcode/wifi",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]),
CURLOPT_HTTPHEADER => [
"byvalue-token: {{apiKey}}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/qrcode/wifi', [
'body' => '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}',
'headers' => [
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/qrcode/wifi');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'image' => '',
'output' => '',
'size' => '',
'style' => ''
]));
$request->setRequestUrl('{{baseUrl}}/qrcode/wifi');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'byvalue-token' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/qrcode/wifi' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
$headers=@{}
$headers.Add("byvalue-token", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/qrcode/wifi' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
headers = {
'byvalue-token': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/qrcode/wifi", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/qrcode/wifi"
payload = {
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}
headers = {
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/qrcode/wifi"
payload <- "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('byvalue-token' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/qrcode/wifi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["byvalue-token"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/qrcode/wifi') do |req|
req.headers['byvalue-token'] = '{{apiKey}}'
req.body = "{\n \"data\": \"\",\n \"image\": \"\",\n \"output\": \"\",\n \"size\": \"\",\n \"style\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/qrcode/wifi";
let payload = json!({
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("byvalue-token", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/qrcode/wifi \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--data '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}'
echo '{
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
}' | \
http POST {{baseUrl}}/qrcode/wifi \
byvalue-token:'{{apiKey}}' \
content-type:application/json
wget --quiet \
--method POST \
--header 'byvalue-token: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "image": "",\n "output": "",\n "size": "",\n "style": ""\n}' \
--output-document \
- {{baseUrl}}/qrcode/wifi
import Foundation
let headers = [
"byvalue-token": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"data": "",
"image": "",
"output": "",
"size": "",
"style": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/qrcode/wifi")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()