Content Management
POST
Content feeds
{{baseUrl}}/v3/feeds
HEADERS
WM_QOS.CORRELATION_ID
WM_SVC.NAME
WM_SEC.TIMESTAMP
WM_SEC.AUTH_SIGNATURE
WM_CONSUMER.ID
QUERY PARAMS
feedType
BODY multipartForm
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v3/feeds?feedType=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "wm_qos.correlation_id: ");
headers = curl_slist_append(headers, "wm_svc.name: ");
headers = curl_slist_append(headers, "wm_sec.timestamp: ");
headers = curl_slist_append(headers, "wm_sec.auth_signature: ");
headers = curl_slist_append(headers, "wm_consumer.id: ");
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=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v3/feeds" {:headers {:wm_qos.correlation_id ""
:wm_svc.name ""
:wm_sec.timestamp ""
:wm_sec.auth_signature ""
:wm_consumer.id ""}
:query-params {:feedType ""}
:multipart [{:name "file"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/v3/feeds?feedType="
headers = HTTP::Headers{
"wm_qos.correlation_id" => ""
"wm_svc.name" => ""
"wm_sec.timestamp" => ""
"wm_sec.auth_signature" => ""
"wm_consumer.id" => ""
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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}}/v3/feeds?feedType="),
Headers =
{
{ "wm_qos.correlation_id", "" },
{ "wm_svc.name", "" },
{ "wm_sec.timestamp", "" },
{ "wm_sec.auth_signature", "" },
{ "wm_consumer.id", "" },
},
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "file",
}
}
},
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v3/feeds?feedType=");
var request = new RestRequest("", Method.Post);
request.AddHeader("wm_qos.correlation_id", "");
request.AddHeader("wm_svc.name", "");
request.AddHeader("wm_sec.timestamp", "");
request.AddHeader("wm_sec.auth_signature", "");
request.AddHeader("wm_consumer.id", "");
request.AddHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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}}/v3/feeds?feedType="
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("wm_qos.correlation_id", "")
req.Header.Add("wm_svc.name", "")
req.Header.Add("wm_sec.timestamp", "")
req.Header.Add("wm_sec.auth_signature", "")
req.Header.Add("wm_consumer.id", "")
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/v3/feeds?feedType= HTTP/1.1
Wm_qos.correlation_id:
Wm_svc.name:
Wm_sec.timestamp:
Wm_sec.auth_signature:
Wm_consumer.id:
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 113
-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v3/feeds?feedType=")
.setHeader("wm_qos.correlation_id", "")
.setHeader("wm_svc.name", "")
.setHeader("wm_sec.timestamp", "")
.setHeader("wm_sec.auth_signature", "")
.setHeader("wm_consumer.id", "")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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}}/v3/feeds?feedType="))
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/v3/feeds?feedType=")
.post(body)
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v3/feeds?feedType=")
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('file', '');
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v3/feeds?feedType=');
xhr.setRequestHeader('wm_qos.correlation_id', '');
xhr.setRequestHeader('wm_svc.name', '');
xhr.setRequestHeader('wm_sec.timestamp', '');
xhr.setRequestHeader('wm_sec.auth_signature', '');
xhr.setRequestHeader('wm_consumer.id', '');
xhr.send(data);
import axios from 'axios';
const form = new FormData();
form.append('file', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/v3/feeds',
params: {feedType: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'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}}/v3/feeds?feedType=';
const form = new FormData();
form.append('file', '');
const options = {
method: 'POST',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
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('file', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v3/feeds?feedType=',
method: 'POST',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
},
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=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/v3/feeds?feedType=")
.post(body)
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.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/v3/feeds?feedType=',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'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="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v3/feeds',
qs: {feedType: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
},
formData: {file: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v3/feeds');
req.query({
feedType: ''
});
req.headers({
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'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}}/v3/feeds',
params: {feedType: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\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('file', '');
const url = '{{baseUrl}}/v3/feeds?feedType=';
const options = {
method: 'POST',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
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 = @{ @"wm_qos.correlation_id": @"",
@"wm_svc.name": @"",
@"wm_sec.timestamp": @"",
@"wm_sec.auth_signature": @"",
@"wm_consumer.id": @"",
@"content-type": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"file", @"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}}/v3/feeds?feedType="]
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}}/v3/feeds?feedType=" in
let headers = Header.add_list (Header.init ()) [
("wm_qos.correlation_id", "");
("wm_svc.name", "");
("wm_sec.timestamp", "");
("wm_sec.auth_signature", "");
("wm_consumer.id", "");
("content-type", "multipart/form-data; boundary=---011000010111000001101001");
] in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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}}/v3/feeds?feedType=",
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=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001",
"wm_consumer.id: ",
"wm_qos.correlation_id: ",
"wm_sec.auth_signature: ",
"wm_sec.timestamp: ",
"wm_svc.name: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v3/feeds?feedType=', [
'headers' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
'wm_consumer.id' => '',
'wm_qos.correlation_id' => '',
'wm_sec.auth_signature' => '',
'wm_sec.timestamp' => '',
'wm_svc.name' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v3/feeds');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'feedType' => ''
]);
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => '',
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/v3/feeds');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'feedType' => ''
]));
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v3/feeds?feedType=' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v3/feeds?feedType=' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {
'wm_qos.correlation_id': "",
'wm_svc.name': "",
'wm_sec.timestamp': "",
'wm_sec.auth_signature': "",
'wm_consumer.id': "",
'content-type': "multipart/form-data; boundary=---011000010111000001101001"
}
conn.request("POST", "/baseUrl/v3/feeds?feedType=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v3/feeds"
querystring = {"feedType":""}
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": "",
"content-type": "multipart/form-data; boundary=---011000010111000001101001"
}
response = requests.post(url, data=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v3/feeds"
queryString <- list(feedType = "")
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, query = queryString, add_headers('wm_qos.correlation_id' = '', 'wm_svc.name' = '', 'wm_sec.timestamp' = '', 'wm_sec.auth_signature' = '', 'wm_consumer.id' = ''), content_type("multipart/form-data"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v3/feeds?feedType=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["wm_qos.correlation_id"] = ''
request["wm_svc.name"] = ''
request["wm_sec.timestamp"] = ''
request["wm_sec.auth_signature"] = ''
request["wm_consumer.id"] = ''
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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/v3/feeds') do |req|
req.headers['wm_qos.correlation_id'] = ''
req.headers['wm_svc.name'] = ''
req.headers['wm_sec.timestamp'] = ''
req.headers['wm_sec.auth_signature'] = ''
req.headers['wm_consumer.id'] = ''
req.params['feedType'] = ''
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\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}}/v3/feeds";
let querystring = [
("feedType", ""),
];
let form = reqwest::multipart::Form::new()
.text("file", "");
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("wm_qos.correlation_id", "".parse().unwrap());
headers.insert("wm_svc.name", "".parse().unwrap());
headers.insert("wm_sec.timestamp", "".parse().unwrap());
headers.insert("wm_sec.auth_signature", "".parse().unwrap());
headers.insert("wm_consumer.id", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/v3/feeds?feedType=' \
--header 'content-type: multipart/form-data' \
--header 'wm_consumer.id: ' \
--header 'wm_qos.correlation_id: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_svc.name: ' \
--form file=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="file"
-----011000010111000001101001--
' | \
http POST '{{baseUrl}}/v3/feeds?feedType=' \
content-type:'multipart/form-data; boundary=---011000010111000001101001' \
wm_consumer.id:'' \
wm_qos.correlation_id:'' \
wm_sec.auth_signature:'' \
wm_sec.timestamp:'' \
wm_svc.name:''
wget --quiet \
--method POST \
--header 'wm_qos.correlation_id: ' \
--header 'wm_svc.name: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_consumer.id: ' \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="file"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- '{{baseUrl}}/v3/feeds?feedType='
import Foundation
let headers = [
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": "",
"content-type": "multipart/form-data; boundary=---011000010111000001101001"
]
let parameters = [
[
"name": "file",
"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}}/v3/feeds?feedType=")! 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/xml
RESPONSE BODY xml
039F4AEA0B3A4E1FBEF0A6403507B18C@AQQBAQA
GET
Feed item status
{{baseUrl}}/feeds/:feedId
HEADERS
WM_QOS.CORRELATION_ID
WM_SVC.NAME
WM_SEC.TIMESTAMP
WM_SEC.AUTH_SIGNATURE
WM_CONSUMER.ID
QUERY PARAMS
feedId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/feeds/:feedId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "wm_qos.correlation_id: ");
headers = curl_slist_append(headers, "wm_svc.name: ");
headers = curl_slist_append(headers, "wm_sec.timestamp: ");
headers = curl_slist_append(headers, "wm_sec.auth_signature: ");
headers = curl_slist_append(headers, "wm_consumer.id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/feeds/:feedId" {:headers {:wm_qos.correlation_id ""
:wm_svc.name ""
:wm_sec.timestamp ""
:wm_sec.auth_signature ""
:wm_consumer.id ""}})
require "http/client"
url = "{{baseUrl}}/feeds/:feedId"
headers = HTTP::Headers{
"wm_qos.correlation_id" => ""
"wm_svc.name" => ""
"wm_sec.timestamp" => ""
"wm_sec.auth_signature" => ""
"wm_consumer.id" => ""
}
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}}/feeds/:feedId"),
Headers =
{
{ "wm_qos.correlation_id", "" },
{ "wm_svc.name", "" },
{ "wm_sec.timestamp", "" },
{ "wm_sec.auth_signature", "" },
{ "wm_consumer.id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/feeds/:feedId");
var request = new RestRequest("", Method.Get);
request.AddHeader("wm_qos.correlation_id", "");
request.AddHeader("wm_svc.name", "");
request.AddHeader("wm_sec.timestamp", "");
request.AddHeader("wm_sec.auth_signature", "");
request.AddHeader("wm_consumer.id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/feeds/:feedId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wm_qos.correlation_id", "")
req.Header.Add("wm_svc.name", "")
req.Header.Add("wm_sec.timestamp", "")
req.Header.Add("wm_sec.auth_signature", "")
req.Header.Add("wm_consumer.id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/feeds/:feedId HTTP/1.1
Wm_qos.correlation_id:
Wm_svc.name:
Wm_sec.timestamp:
Wm_sec.auth_signature:
Wm_consumer.id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/feeds/:feedId")
.setHeader("wm_qos.correlation_id", "")
.setHeader("wm_svc.name", "")
.setHeader("wm_sec.timestamp", "")
.setHeader("wm_sec.auth_signature", "")
.setHeader("wm_consumer.id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/feeds/:feedId"))
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.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}}/feeds/:feedId")
.get()
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/feeds/:feedId")
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.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}}/feeds/:feedId');
xhr.setRequestHeader('wm_qos.correlation_id', '');
xhr.setRequestHeader('wm_svc.name', '');
xhr.setRequestHeader('wm_sec.timestamp', '');
xhr.setRequestHeader('wm_sec.auth_signature', '');
xhr.setRequestHeader('wm_consumer.id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/feeds/:feedId',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/feeds/:feedId';
const options = {
method: 'GET',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
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}}/feeds/:feedId',
method: 'GET',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/feeds/:feedId")
.get()
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/feeds/:feedId',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
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}}/feeds/:feedId',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/feeds/:feedId');
req.headers({
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
});
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}}/feeds/:feedId',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/feeds/:feedId';
const options = {
method: 'GET',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"wm_qos.correlation_id": @"",
@"wm_svc.name": @"",
@"wm_sec.timestamp": @"",
@"wm_sec.auth_signature": @"",
@"wm_consumer.id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/feeds/:feedId"]
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}}/feeds/:feedId" in
let headers = Header.add_list (Header.init ()) [
("wm_qos.correlation_id", "");
("wm_svc.name", "");
("wm_sec.timestamp", "");
("wm_sec.auth_signature", "");
("wm_consumer.id", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/feeds/:feedId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wm_consumer.id: ",
"wm_qos.correlation_id: ",
"wm_sec.auth_signature: ",
"wm_sec.timestamp: ",
"wm_svc.name: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/feeds/:feedId', [
'headers' => [
'wm_consumer.id' => '',
'wm_qos.correlation_id' => '',
'wm_sec.auth_signature' => '',
'wm_sec.timestamp' => '',
'wm_svc.name' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/feeds/:feedId');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/feeds/:feedId');
$request->setRequestMethod('GET');
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/feeds/:feedId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/feeds/:feedId' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'wm_qos.correlation_id': "",
'wm_svc.name': "",
'wm_sec.timestamp': "",
'wm_sec.auth_signature': "",
'wm_consumer.id': ""
}
conn.request("GET", "/baseUrl/feeds/:feedId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/feeds/:feedId"
headers = {
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": ""
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/feeds/:feedId"
response <- VERB("GET", url, add_headers('wm_qos.correlation_id' = '', 'wm_svc.name' = '', 'wm_sec.timestamp' = '', 'wm_sec.auth_signature' = '', 'wm_consumer.id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/feeds/:feedId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["wm_qos.correlation_id"] = ''
request["wm_svc.name"] = ''
request["wm_sec.timestamp"] = ''
request["wm_sec.auth_signature"] = ''
request["wm_consumer.id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/feeds/:feedId') do |req|
req.headers['wm_qos.correlation_id'] = ''
req.headers['wm_svc.name'] = ''
req.headers['wm_sec.timestamp'] = ''
req.headers['wm_sec.auth_signature'] = ''
req.headers['wm_consumer.id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/feeds/:feedId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("wm_qos.correlation_id", "".parse().unwrap());
headers.insert("wm_svc.name", "".parse().unwrap());
headers.insert("wm_sec.timestamp", "".parse().unwrap());
headers.insert("wm_sec.auth_signature", "".parse().unwrap());
headers.insert("wm_consumer.id", "".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}}/feeds/:feedId \
--header 'wm_consumer.id: ' \
--header 'wm_qos.correlation_id: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_svc.name: '
http GET {{baseUrl}}/feeds/:feedId \
wm_consumer.id:'' \
wm_qos.correlation_id:'' \
wm_sec.auth_signature:'' \
wm_sec.timestamp:'' \
wm_svc.name:''
wget --quiet \
--method GET \
--header 'wm_qos.correlation_id: ' \
--header 'wm_svc.name: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_consumer.id: ' \
--output-document \
- {{baseUrl}}/feeds/:feedId
import Foundation
let headers = [
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/feeds/:feedId")! 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/xml
RESPONSE BODY xml
4BD182294ECD4398AEBF3A4FAEB1AE30@AQMBAAA
PROCESSED
3
3
0
0
0
50
0
Ikk3EoRhOVsL9kmWgM6y
2SID2R8VLS5F
SUCCESS
0
pfszvVuJ8TWgz4nKLHst
4NZ5M2JBIK2O
SUCCESS
0
JWEWrfXxN9WSEPuJ1usA
5C1J547KN0UT
SUCCESS
GET
Feed status
{{baseUrl}}/feeds
HEADERS
WM_QOS.CORRELATION_ID
WM_SVC.NAME
WM_SEC.TIMESTAMP
WM_SEC.AUTH_SIGNATURE
WM_CONSUMER.ID
QUERY PARAMS
feedId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/feeds?feedId=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "wm_qos.correlation_id: ");
headers = curl_slist_append(headers, "wm_svc.name: ");
headers = curl_slist_append(headers, "wm_sec.timestamp: ");
headers = curl_slist_append(headers, "wm_sec.auth_signature: ");
headers = curl_slist_append(headers, "wm_consumer.id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/feeds" {:headers {:wm_qos.correlation_id ""
:wm_svc.name ""
:wm_sec.timestamp ""
:wm_sec.auth_signature ""
:wm_consumer.id ""}
:query-params {:feedId ""}})
require "http/client"
url = "{{baseUrl}}/feeds?feedId="
headers = HTTP::Headers{
"wm_qos.correlation_id" => ""
"wm_svc.name" => ""
"wm_sec.timestamp" => ""
"wm_sec.auth_signature" => ""
"wm_consumer.id" => ""
}
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}}/feeds?feedId="),
Headers =
{
{ "wm_qos.correlation_id", "" },
{ "wm_svc.name", "" },
{ "wm_sec.timestamp", "" },
{ "wm_sec.auth_signature", "" },
{ "wm_consumer.id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/feeds?feedId=");
var request = new RestRequest("", Method.Get);
request.AddHeader("wm_qos.correlation_id", "");
request.AddHeader("wm_svc.name", "");
request.AddHeader("wm_sec.timestamp", "");
request.AddHeader("wm_sec.auth_signature", "");
request.AddHeader("wm_consumer.id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/feeds?feedId="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("wm_qos.correlation_id", "")
req.Header.Add("wm_svc.name", "")
req.Header.Add("wm_sec.timestamp", "")
req.Header.Add("wm_sec.auth_signature", "")
req.Header.Add("wm_consumer.id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/feeds?feedId= HTTP/1.1
Wm_qos.correlation_id:
Wm_svc.name:
Wm_sec.timestamp:
Wm_sec.auth_signature:
Wm_consumer.id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/feeds?feedId=")
.setHeader("wm_qos.correlation_id", "")
.setHeader("wm_svc.name", "")
.setHeader("wm_sec.timestamp", "")
.setHeader("wm_sec.auth_signature", "")
.setHeader("wm_consumer.id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/feeds?feedId="))
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.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}}/feeds?feedId=")
.get()
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/feeds?feedId=")
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.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}}/feeds?feedId=');
xhr.setRequestHeader('wm_qos.correlation_id', '');
xhr.setRequestHeader('wm_svc.name', '');
xhr.setRequestHeader('wm_sec.timestamp', '');
xhr.setRequestHeader('wm_sec.auth_signature', '');
xhr.setRequestHeader('wm_consumer.id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/feeds',
params: {feedId: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/feeds?feedId=';
const options = {
method: 'GET',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
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}}/feeds?feedId=',
method: 'GET',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/feeds?feedId=")
.get()
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/feeds?feedId=',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
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}}/feeds',
qs: {feedId: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/feeds');
req.query({
feedId: ''
});
req.headers({
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
});
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}}/feeds',
params: {feedId: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/feeds?feedId=';
const options = {
method: 'GET',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': ''
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"wm_qos.correlation_id": @"",
@"wm_svc.name": @"",
@"wm_sec.timestamp": @"",
@"wm_sec.auth_signature": @"",
@"wm_consumer.id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/feeds?feedId="]
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}}/feeds?feedId=" in
let headers = Header.add_list (Header.init ()) [
("wm_qos.correlation_id", "");
("wm_svc.name", "");
("wm_sec.timestamp", "");
("wm_sec.auth_signature", "");
("wm_consumer.id", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/feeds?feedId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"wm_consumer.id: ",
"wm_qos.correlation_id: ",
"wm_sec.auth_signature: ",
"wm_sec.timestamp: ",
"wm_svc.name: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/feeds?feedId=', [
'headers' => [
'wm_consumer.id' => '',
'wm_qos.correlation_id' => '',
'wm_sec.auth_signature' => '',
'wm_sec.timestamp' => '',
'wm_svc.name' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/feeds');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'feedId' => ''
]);
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/feeds');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'feedId' => ''
]));
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/feeds?feedId=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/feeds?feedId=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'wm_qos.correlation_id': "",
'wm_svc.name': "",
'wm_sec.timestamp': "",
'wm_sec.auth_signature': "",
'wm_consumer.id': ""
}
conn.request("GET", "/baseUrl/feeds?feedId=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/feeds"
querystring = {"feedId":""}
headers = {
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/feeds"
queryString <- list(feedId = "")
response <- VERB("GET", url, query = queryString, add_headers('wm_qos.correlation_id' = '', 'wm_svc.name' = '', 'wm_sec.timestamp' = '', 'wm_sec.auth_signature' = '', 'wm_consumer.id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/feeds?feedId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["wm_qos.correlation_id"] = ''
request["wm_svc.name"] = ''
request["wm_sec.timestamp"] = ''
request["wm_sec.auth_signature"] = ''
request["wm_consumer.id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/feeds') do |req|
req.headers['wm_qos.correlation_id'] = ''
req.headers['wm_svc.name'] = ''
req.headers['wm_sec.timestamp'] = ''
req.headers['wm_sec.auth_signature'] = ''
req.headers['wm_consumer.id'] = ''
req.params['feedId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/feeds";
let querystring = [
("feedId", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("wm_qos.correlation_id", "".parse().unwrap());
headers.insert("wm_svc.name", "".parse().unwrap());
headers.insert("wm_sec.timestamp", "".parse().unwrap());
headers.insert("wm_sec.auth_signature", "".parse().unwrap());
headers.insert("wm_consumer.id", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/feeds?feedId=' \
--header 'wm_consumer.id: ' \
--header 'wm_qos.correlation_id: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_svc.name: '
http GET '{{baseUrl}}/feeds?feedId=' \
wm_consumer.id:'' \
wm_qos.correlation_id:'' \
wm_sec.auth_signature:'' \
wm_sec.timestamp:'' \
wm_svc.name:''
wget --quiet \
--method GET \
--header 'wm_qos.correlation_id: ' \
--header 'wm_svc.name: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_consumer.id: ' \
--output-document \
- '{{baseUrl}}/feeds?feedId='
import Foundation
let headers = [
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/feeds?feedId=")! 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/xml
RESPONSE BODY xml
1
0
50
039F4AEA0B3A4E1FBEF0A6403507B18C@AQQBAQA
CONTENT_PRODUCT
721407
1
1
0
0
PROCESSED
2016-08-29T21:00:47.546Z
b1234
2016-08-29T21:01:17.099Z
V3_101_Electronics.xlsm
0
0
0
POST
Rich Media
{{baseUrl}}/v2/feeds
HEADERS
WM_QOS.CORRELATION_ID
WM_SVC.NAME
WM_SEC.TIMESTAMP
WM_SEC.AUTH_SIGNATURE
WM_CONSUMER.ID
QUERY PARAMS
feedType
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/feeds?feedType=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "wm_qos.correlation_id: ");
headers = curl_slist_append(headers, "wm_svc.name: ");
headers = curl_slist_append(headers, "wm_sec.timestamp: ");
headers = curl_slist_append(headers, "wm_sec.auth_signature: ");
headers = curl_slist_append(headers, "wm_consumer.id: ");
headers = curl_slist_append(headers, "content-type: application/xml");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/feeds" {:headers {:wm_qos.correlation_id ""
:wm_svc.name ""
:wm_sec.timestamp ""
:wm_sec.auth_signature ""
:wm_consumer.id ""
:content-type "application/xml"}
:query-params {:feedType ""}})
require "http/client"
url = "{{baseUrl}}/v2/feeds?feedType="
headers = HTTP::Headers{
"wm_qos.correlation_id" => ""
"wm_svc.name" => ""
"wm_sec.timestamp" => ""
"wm_sec.auth_signature" => ""
"wm_consumer.id" => ""
"content-type" => "application/xml"
}
reqBody = "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \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}}/v2/feeds?feedType="),
Headers =
{
{ "wm_qos.correlation_id", "" },
{ "wm_svc.name", "" },
{ "wm_sec.timestamp", "" },
{ "wm_sec.auth_signature", "" },
{ "wm_consumer.id", "" },
},
Content = new StringContent("\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/xml")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/feeds?feedType=");
var request = new RestRequest("", Method.Post);
request.AddHeader("wm_qos.correlation_id", "");
request.AddHeader("wm_svc.name", "");
request.AddHeader("wm_sec.timestamp", "");
request.AddHeader("wm_sec.auth_signature", "");
request.AddHeader("wm_consumer.id", "");
request.AddHeader("content-type", "application/xml");
request.AddParameter("application/xml", "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/feeds?feedType="
payload := strings.NewReader("\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("wm_qos.correlation_id", "")
req.Header.Add("wm_svc.name", "")
req.Header.Add("wm_sec.timestamp", "")
req.Header.Add("wm_sec.auth_signature", "")
req.Header.Add("wm_consumer.id", "")
req.Header.Add("content-type", "application/xml")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/feeds?feedType= HTTP/1.1
Wm_qos.correlation_id:
Wm_svc.name:
Wm_sec.timestamp:
Wm_sec.auth_signature:
Wm_consumer.id:
Content-Type: application/xml
Host: example.com
Content-Length: 9333
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/feeds?feedType=")
.setHeader("wm_qos.correlation_id", "")
.setHeader("wm_svc.name", "")
.setHeader("wm_sec.timestamp", "")
.setHeader("wm_sec.auth_signature", "")
.setHeader("wm_consumer.id", "")
.setHeader("content-type", "application/xml")
.setBody("\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/feeds?feedType="))
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.header("content-type", "application/xml")
.method("POST", HttpRequest.BodyPublishers.ofString("\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \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/xml");
RequestBody body = RequestBody.create(mediaType, "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/feeds?feedType=")
.post(body)
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.addHeader("content-type", "application/xml")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/feeds?feedType=")
.header("wm_qos.correlation_id", "")
.header("wm_svc.name", "")
.header("wm_sec.timestamp", "")
.header("wm_sec.auth_signature", "")
.header("wm_consumer.id", "")
.header("content-type", "application/xml")
.body("\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ")
.asString();
const data = '
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
';
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/feeds?feedType=');
xhr.setRequestHeader('wm_qos.correlation_id', '');
xhr.setRequestHeader('wm_svc.name', '');
xhr.setRequestHeader('wm_sec.timestamp', '');
xhr.setRequestHeader('wm_sec.auth_signature', '');
xhr.setRequestHeader('wm_consumer.id', '');
xhr.setRequestHeader('content-type', 'application/xml');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/feeds',
params: {feedType: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
},
data: '\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n '
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/feeds?feedType=';
const options = {
method: 'POST',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
},
body: '\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n '
};
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}}/v2/feeds?feedType=',
method: 'POST',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
},
data: '\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n '
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/xml")
val body = RequestBody.create(mediaType, "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ")
val request = Request.Builder()
.url("{{baseUrl}}/v2/feeds?feedType=")
.post(body)
.addHeader("wm_qos.correlation_id", "")
.addHeader("wm_svc.name", "")
.addHeader("wm_sec.timestamp", "")
.addHeader("wm_sec.auth_signature", "")
.addHeader("wm_consumer.id", "")
.addHeader("content-type", "application/xml")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/feeds?feedType=',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
}
};
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('\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/feeds',
qs: {feedType: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
},
body: '\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n '
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/feeds');
req.query({
feedType: ''
});
req.headers({
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
});
req.send('\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ');
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}}/v2/feeds',
params: {feedType: ''},
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
},
data: '\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n '
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/feeds?feedType=';
const options = {
method: 'POST',
headers: {
'wm_qos.correlation_id': '',
'wm_svc.name': '',
'wm_sec.timestamp': '',
'wm_sec.auth_signature': '',
'wm_consumer.id': '',
'content-type': 'application/xml'
},
body: '\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n '
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"wm_qos.correlation_id": @"",
@"wm_svc.name": @"",
@"wm_sec.timestamp": @"",
@"wm_sec.auth_signature": @"",
@"wm_consumer.id": @"",
@"content-type": @"application/xml" };
NSData *postData = [[NSData alloc] initWithData:[@"
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
" dataUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/feeds?feedType="]
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}}/v2/feeds?feedType=" in
let headers = Header.add_list (Header.init ()) [
("wm_qos.correlation_id", "");
("wm_svc.name", "");
("wm_sec.timestamp", "");
("wm_sec.auth_signature", "");
("wm_consumer.id", "");
("content-type", "application/xml");
] in
let body = Cohttp_lwt_body.of_string "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n " in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/feeds?feedType=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ",
CURLOPT_HTTPHEADER => [
"content-type: application/xml",
"wm_consumer.id: ",
"wm_qos.correlation_id: ",
"wm_sec.auth_signature: ",
"wm_sec.timestamp: ",
"wm_svc.name: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/feeds?feedType=', [
'body' => '
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
',
'headers' => [
'content-type' => 'application/xml',
'wm_consumer.id' => '',
'wm_qos.correlation_id' => '',
'wm_sec.auth_signature' => '',
'wm_sec.timestamp' => '',
'wm_svc.name' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/feeds');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'feedType' => ''
]);
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => '',
'content-type' => 'application/xml'
]);
$request->setBody('
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append('
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
');
$request->setRequestUrl('{{baseUrl}}/v2/feeds');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'feedType' => ''
]));
$request->setHeaders([
'wm_qos.correlation_id' => '',
'wm_svc.name' => '',
'wm_sec.timestamp' => '',
'wm_sec.auth_signature' => '',
'wm_consumer.id' => '',
'content-type' => 'application/xml'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$headers.Add("content-type", "application/xml")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/feeds?feedType=' -Method POST -Headers $headers -ContentType 'application/xml' -Body '
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
'
$headers=@{}
$headers.Add("wm_qos.correlation_id", "")
$headers.Add("wm_svc.name", "")
$headers.Add("wm_sec.timestamp", "")
$headers.Add("wm_sec.auth_signature", "")
$headers.Add("wm_consumer.id", "")
$headers.Add("content-type", "application/xml")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/feeds?feedType=' -Method POST -Headers $headers -ContentType 'application/xml' -Body '
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n "
headers = {
'wm_qos.correlation_id': "",
'wm_svc.name': "",
'wm_sec.timestamp': "",
'wm_sec.auth_signature': "",
'wm_consumer.id': "",
'content-type': "application/xml"
}
conn.request("POST", "/baseUrl/v2/feeds?feedType=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/feeds"
querystring = {"feedType":""}
payload = "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n "
headers = {
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": "",
"content-type": "application/xml"
}
response = requests.post(url, data=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/feeds"
queryString <- list(feedType = "")
payload <- "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n "
encode <- "raw"
response <- VERB("POST", url, body = payload, query = queryString, add_headers('wm_qos.correlation_id' = '', 'wm_svc.name' = '', 'wm_sec.timestamp' = '', 'wm_sec.auth_signature' = '', 'wm_consumer.id' = ''), content_type("application/xml"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/feeds?feedType=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["wm_qos.correlation_id"] = ''
request["wm_svc.name"] = ''
request["wm_sec.timestamp"] = ''
request["wm_sec.auth_signature"] = ''
request["wm_consumer.id"] = ''
request["content-type"] = 'application/xml'
request.body = "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n "
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/xml'}
)
response = conn.post('/baseUrl/v2/feeds') do |req|
req.headers['wm_qos.correlation_id'] = ''
req.headers['wm_svc.name'] = ''
req.headers['wm_sec.timestamp'] = ''
req.headers['wm_sec.auth_signature'] = ''
req.headers['wm_consumer.id'] = ''
req.params['feedType'] = ''
req.body = "\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n "
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/feeds";
let querystring = [
("feedType", ""),
];
let payload = "
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("wm_qos.correlation_id", "".parse().unwrap());
headers.insert("wm_svc.name", "".parse().unwrap());
headers.insert("wm_sec.timestamp", "".parse().unwrap());
headers.insert("wm_sec.auth_signature", "".parse().unwrap());
headers.insert("wm_consumer.id", "".parse().unwrap());
headers.insert("content-type", "application/xml".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.body(payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/v2/feeds?feedType=' \
--header 'content-type: application/xml' \
--header 'wm_consumer.id: ' \
--header 'wm_qos.correlation_id: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_svc.name: ' \
--data '
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
'
echo '
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
' | \
http POST '{{baseUrl}}/v2/feeds?feedType=' \
content-type:application/xml \
wm_consumer.id:'' \
wm_qos.correlation_id:'' \
wm_sec.auth_signature:'' \
wm_sec.timestamp:'' \
wm_svc.name:''
wget --quiet \
--method POST \
--header 'wm_qos.correlation_id: ' \
--header 'wm_svc.name: ' \
--header 'wm_sec.timestamp: ' \
--header 'wm_sec.auth_signature: ' \
--header 'wm_consumer.id: ' \
--header 'content-type: application/xml' \
--body-data '\n\n \n 2.1.2 \n requestId \n requestBatchId \n 2001-12-31T12:00:00 \n WALMART_US \n \n \n \n \n UPC \n 815812013182 \n \n \n \n \n html-content \n \n \n html-content \n \n \n html-content \n \n \n \n \n \n \n title \n url \n pdf \n 0 \n \n url \n png \n 120 \n 100 \n \n 0 \n \n \n \n \n title \n description \n en-US \n \n url \n webvtt \n en-US \n \n 0 \n \n url \n 720 \n 480 \n mp4 \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n \n url \n 720 \n 480 \n mp4 \n mobile \n \n url \n png \n 120 \n 100 \n \n \n url \n jpg \n 720 \n 480 \n \n \n \n 0 \n 0 \n 0 \n tags \n \n \n \n \n \n title \n url \n 0 \n 0 \n png \n \n \n \n \n \n \n caption \n \n \n caption \n \n \n \n \n \n \n \n \n title \n \n url \n png \n 120 \n 120 \n \n \n \n UPC \n productId \n \n \n \n \n value \n \n \n \n \n \n html-content \n \n \n \n \n attributeName \n attributeValue \n \n \n \n \n \n name \n LOCALIZABLE_TEXT \n \n value \n group \n 0 \n \n \n \n \n \n ' \
--output-document \
- '{{baseUrl}}/v2/feeds?feedType='
import Foundation
let headers = [
"wm_qos.correlation_id": "",
"wm_svc.name": "",
"wm_sec.timestamp": "",
"wm_sec.auth_signature": "",
"wm_consumer.id": "",
"content-type": "application/xml"
]
let postData = NSData(data: "
2.1.2
requestId
requestBatchId
2001-12-31T12:00:00
WALMART_US
UPC
815812013182
html-content
html-content
html-content
title
url
pdf
0
url
png
120
100
0
title
description
en-US
url
webvtt
en-US
0
url
720
480
mp4
url
png
120
100
url
jpg
720
480
url
720
480
mp4
mobile
url
png
120
100
url
jpg
720
480
0
0
0
tags
title
url
0
0
png
caption
caption
title
url
png
120
120
UPC
productId
value
html-content
attributeName
attributeValue
name
LOCALIZABLE_TEXT
value
group
0
".data(using: String.Encoding.utf8)!)
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/feeds?feedType=")! 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()