Java To POSTMAN Or C#

$ 10.00 — 30.00 USD
I have the following code i want to understand what exactly happen to be apple to change to c#
notes: i try to do the same But submit put and add XML in the body and its rejected
see attached file

https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/feeds-api-use-case-guide/feeds-api-use-case-guide_2021-06-30.md#upload-sample-code-java

// UploadExample.java
// This example is for use with the Selling Partner API for Feeds, Version: 2021-06-30
import java.io.
IOException;
import java.nio.charset.
StandardCharsets;

import com.squareup.okhttp.
MediaType;
import com.squareup.okhttp.
OkHttpClient;
import com.squareup.okhttp.
Request;
import com.squareup.okhttp.
RequestBody;
import com.squareup.okhttp.
Response;

/**
* Example that uploads content.
*/
public class UploadExample {

public static void main(String args) {
String url = "";
String content = "";

UploadExample obj = new UploadExample();
obj.upload(content.getBytes(StandardCharsets.
UTF_8), url);
}

/**
* Upload content to the given URL.
*
* @param source the content to upload
* @param url the URL to upload content
*/
public void upload(byte source, String url) {
OkHttpClient client = new OkHttpClient();

// The contentType must match the input provided to the createFeedDocument operation.
This example uses text/xml, but your contentType may be different depending upon on your chosen feedType (text/plain, text/csv, and so on).
String contentType = String.format("text/xml; charset=%s", StandardCharsets.
UTF_8);
try {
Request request = new Request.
Builder()
.url(url)
.put(RequestBody.create(MediaType.parse(contentType), source))
.build();

Response response = client.newCall(request).execute();
if (!response.isSuccessful()) {
System.out.println(
String.format("Call to upload document failed with response code: %d and message: %s",
response.code(), response.message()));
}
} catch (IOException e) {
System.out.println(e.getMessage());
}

}
}

Similar Freelance jobs:

Mobile App Developer - Android / Ios
Role / requirements:\r\nMobile application developer wanted urgently for a simple mobile app project.\r\nLooking for freelance / contract arrangement at the moment with possibility of a full time role later.\r\nMust be familiar with Titanium and Phonegap\r\nMust be familiar with web application architectures (client - server setup)\r\nAble to develop and program independently based on technical user requirements provided.\r\nMulti platform dev experience would be very useful - I.e. trigger, phonegap, appcelerator.\r\nUI design experience is a plus.\r\nNo educational requirements needed as long as you…
Full Description of Mobile app developer - Android / iOS
Write Some Software
* Create Master Port Module at Ship Management by Struts 1 framework on Java * Create journal entry for module PO and Invoice by Struts 2 framework on java
Full Description of Write some Software
I Want To Build A Tool Using Hap.py Benchmarking (nist) To Validate Any Vcf File By Running The File
The inputs to hap.py are two VCF files (a "truth" and a "query" file), the truth file is found here https://www.nature.com/articles/sdata201625/tables/3 which includes extensive genome sequencing for 1 person. So we can validate any VCF file by comparing our VCF with the truth VCF and the outcome will include a table with TP FP TN FN and precision with the sensitivity you can read more about it on this page: https://github.com/RealTimeGenomics/rtg-tools https://github.com/Illumina/hap.py/blob/master/doc/happy.md#working-with-genome-vcfs
Full Description of I want to build a tool using Hap.py…
Pms Hotel System
Hello look forwared property management system, system have to including front desk, back desk, accounting, room servicess and reports ..etc. web site and mobile application system have to work online from any where as per authruty for each stockholders hope to done it with creative team that have experiance with similar job
Full Description of PMS hotel system
Linux Distro
Hi everyone! I'm looking for a embedded systems engineer someone with vast knowledge on C++, QT, Kirigami UI Framework, Maui Project Framework these frameworks and knowledge in this language would be of great help in my creation a device I'm engineering. Other important areas of expertise: KDE Plasma, Calamares Installer, Kubuntu Invite will need to sign NDA. Thank you!
Full Description of Linux Distro
Design And Develop A Statistical And Financial Questions Based App In Flutter
design and develop a statistical and financial questions based app in flutter with all the requirements needed. the details will only be discussed with selected freelancers (with good ratings and reviews and must be european) serious bids please
Full Description of design and develop a statistical and financial questions…
Build Me A Fast Proof Of Stake Cryptocurrency
I am looking for an expert at creating cryptocurrencies to develop a fast Proof of Stake cryptocurrency using its own customized network like EOS and XRP. This means that the transaction time between receiving and sending the crypto should be about 5 seconds. I will provide more information about the project in private with whoever is interested in taking on this job.
Full Description of Build me a fast Proof of Stake Cryptocurrency
Build Me Customer Portal And Admin Portal
My business needs to be able to create two portals for our customers. they are business that need to manage wireless services among different phone carriers. the carriers have provided their api to integrate with their systems the portals that I need created will look like the pictures, the issue is that I need a developer that can connect those actions under "tools" from our website to the carrier's portals. The carrier's AT&T, T-Mobile, Veirzon and Claro have all provided…
Full Description of Build me customer portal and admin portal
Stm32 Gui Touchgfx
Realization of a demonstrator on ST STM32F769I-DISCO board (4'' 480x800). STM32Cube - FreeRTOS – TouchGFX The application is defined (screens, sequences to screen or function). Reading one sensors on usart and other messages on canbus (defined messages). Show informations on GUI. Sending messages on canbus (defined messages). Save user's parameters in flash. Source full project Stm32Cube/gfx to deliver. Option: add bootloader IAP on USB to allow the program update (there are 2 flash banks of 1MB. Application is less than…
Full Description of STM32 GUI TouchGFX
Cerner Millennium 2018 And Latest Expert
We are Looking for an expert who has been working and testing Cerner Millennium Software in the past which is medical Grade Software. we need to run some automation in the software to run and do the quality test Below is the scope of work  Test Process  Cerner Millennium and Support Applications along with the Devices  Test schedules  Patient Scenarios to be Tested  Testing entry and exit criteria agreement  Roles and responsibilities matrix agreement…
Full Description of Cerner Millennium 2018 and Latest Expert
Customize Teedy Dms Source Code And Deploy For Production
Teedy is an open source, lightweight document management system for individuals and businesses. I need help to setup the open source code on my local computer and add some customization for deployment. The freelancer will be given access via remote desktop to setup Visual Studio and Tomecat for the wep application deployment and also assist in hosting the application on my hosting space. Customization includes adding another user authentication level and little adjustment to the theme.
Full Description of Customize Teedy DMS Source Code and deploy for…
© 2006 — 2026 hirelancer.com is an affiliate website, listing the freelance projects. We are collaborating with other sites like getFreelancer.com. Feel free to bid on any project and good luck! You will need register first, before bidding or posting projects. Basic memberhsip is always free. We might earn commissions from referring you. You will never ever pay additional fees for we referred you.