Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string serviceUrl = Dts.Variables["$Project::ServiceUrl"].Value.ToString();
- HttpClient client = new HttpClient();
- client.BaseAddress = new Uri(serviceUrl);
- // Add an Accept header for JSON format.
- client.DefaultRequestHeaders.Accept.Add(
- new MediaTypeWithQualityHeaderValue("application/json"));
- ------->>> tutaj brakuje mi coΕ tkaiego bym miaΕ: POST https://blabla.pl/api/transfers
- { "TransferKey":"NDD",
- "SourceID":"0321-2103-3021321231",
- "SourceCode":"ALEALE"
- }
- TUTAJ JAKOS TE DANE MUSZE W POST WRZUCIC
- -----<<<
- if (response.IsSuccessStatusCode)
- {
- var result = response.Content.ReadAsAsync<Response>().Result;
- Dts.TaskResult = (int)ScriptResults.Success;
- }
- }
- catch (Exception ex)
- {
- Dts.TaskResult = (int)ScriptResults.Failure;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement