Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [httprequest]

httprequest is the request sent by browser to server for particular resource.

0
votes
2answers
30 views

Salesforce server IP which is making callout

I have a batch process which makes a HTTP call out to third party, but because of IP restriction third party is denaying the request. Is there any way to get Salesforce server Client IP from where ...
1
vote
2answers
26 views

Deserialize JSON Body into two different Lists of own classes

I'm writing an REST PUT request that takes in an array of Careers and Degrees from the body and converts them to inner classes within the RestResource class. However, when I am attempting to ...
0
votes
0answers
26 views

Apex Multipart HttpRequest - With JSON and BLOB

I am trying to consume a Google Drive API to create a file in an ApexController. I was successful in creating a file in the root folder without specifying a name using the code below http h = new ...
1
vote
0answers
48 views

HttpRequest gives 500 error

I have an APEX class with code to request a token from https://login.salesforce.com/services/oauth2/token. This code works on Development and Acceptance, but is not working on Production. This is de ...
0
votes
0answers
68 views

“Connection reset” exception when sending a callout (HTTP.send())

We have been receiving this intermittent exception when trying to make a callout for a few months now ("Connection reset" is the exception message): Connection reset Class.Sip_HttpUtil.callout: ...
0
votes
1answer
30 views

call out method is not called in a continuous class, call out from VF page

I was trying to do a callout from a VF page constructor. I'm using Continuation class. As I've to show the response in the Page. Yhe problem is the callout method is not called. Below is the code, I ...
2
votes
2answers
71 views

How to parse this JSON response returned in Einstein Chat-Bot?

Currently getting raw JSON response - { "coord": { "lon": 73.85, "lat": 18.52 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear ...
0
votes
1answer
136 views

OAuth 2 Client Credentials - Missing 'grant_type' & Length Required

Trying to connect to an endpoint to receive a token back. Http http = new Http(); httpRequest request = new httpRequest(); request.setHeader('grant_type', 'client_credentials'); request.setHeader('...
2
votes
1answer
125 views

Attempting to pass parameter in request.setEndpoint URL & call through Einstein chat-bot! Is this correct code?

I want to concatenate 'input' variable in the Endpoint URL. If i am passing hard-coded value like 'London', its working properly.(I am getting weather in JSON format back). I want to do it dynamically....
1
vote
1answer
93 views

How to use HttpGet service to get a list of objects and create them?

I have a callout method which helps to get an list of objects from another salesforce-organisation. But how can I convert this list into objects on callout's organisation side? And how can I do this ...
0
votes
1answer
89 views

Saving data from HTTP response in a 'for' loop

Background: We're building an app, that will be periodically calling out to external web service to retrieve data in XML which we need to parse and save to Salesforce. So far: We have an Apex Job ...
0
votes
1answer
86 views

Callout error Invalid conversion from runtime type List<ANY> to Map<String,ANY>

I just followed a trailhead on callouts and I am trying to get some values from an endpoint. My debug shows me my status is ok but I get an error on line 17: Callout error Invalid conversion from ...
1
vote
1answer
178 views

HTTPGET Request in AMP Script with Bearer Token

I was able to successfully perform HTTPPOST using AMPscript with a header, but when I attempted to perform HTTPGET with a header, it is throwing a error. I referred the HTTPGet documentation which ...
1
vote
1answer
34 views

Apex Rest Callout GET Method with Basic Authorization

When I m calling that from POSTMAN with the access token,etc.. I m getting the response. But when I m calling this from Apex it is giving Unauthorized(status:401). I don't know why. See code below: ...
0
votes
0answers
30 views

Trying to build a DELETE URL from List, getting 'Illegal character in URL' error

<< I've added this image, captured as System Log entry. Line breaks after 'contactIds=' appear to be the result of the assembly process. The request I'm trying to assemble consists of an ...
1
vote
0answers
43 views

Response as HTML instead of XML [closed]

How to get response as XML for below URL URL
0
votes
1answer
130 views

Rest Request Callout

I am new in salesforce and I have this rest request to get the access token of the other org so that I can get the installed packages. My problem is, I get an error in sending the authorization ...
3
votes
1answer
171 views

How to send a PATCH HTTP Callout from Apex to Salesforce Tooling REST API

BACKGROUND I using Apex to get a list of FlowDefinition and would like to update the activeVersionNumber via using a PATCH request. QUESTION How can I achieve this using Apex if it does not support ...
1
vote
1answer
118 views

HTTP POST Request with @future and schedulable

I need to create a schedulable Apex job which will send Sales Order Number from Case Object to my integration platform Web Service as JSON. This will be re-mapped and sent to another system, re-mapped ...
2
votes
0answers
24 views

Sending an HTTP request with an imported WSDL with the string 'http://0X'

I have a WSDL that i consume imported as an Apex class. One of the methods receives one String param that is the account website, and one of our users inserted a website that starts with 'http://06'. ...
3
votes
1answer
446 views

Issue while uploading file greater than 5MB

I am trying to upload a file in salesforce and send it to Sharepoint for storage using synchronous call. However, when i upload file more than 5MB i am encountering an issue like below :' {FAILURE=...
0
votes
2answers
192 views

Retrieving csv document using HTTPRequest

I'm working on a project to retrieve/GET a csv file using an HTTPRequest update the associated Salesforce records, and POST a csv back I found this 'send a report as a CSV/TEXT' thread, which looks ...
0
votes
0answers
400 views

Anyone familiar with 'no protocol' CalloutException message, and addressing it?

I'm working a process involving third-party webservices, and have made it past the initial authorization hurdle but am running into a new problem. Regardless of whether the content-type is specified, ...
0
votes
0answers
156 views

Grant_type unsupported Request for Webservice connection

I hope you are all doing well! I currently try to develop a Listener on Carriotds which call a private webservice on Salesforce. I use Basichttp request (which is in intern function of Carriots) and ...
1
vote
1answer
78 views

How to pass API endpoint URL containing \ to

I'm trying to pass the given URL to the setEndpoint method, but I'm getting an error. This particular API URL contains backslash and maybe that's the problem because the code works fine with other ...
1
vote
1answer
94 views

How to approach multiple Rest queries in same method

I have written a Rest Get method where I get a response based on id like, /services/apexrest/invoices/a000X000015ABc2 How do I go about if I want to use this same method for following calls: - GET &...
0
votes
1answer
28 views

External Application receiving multiple Success Pings

For the SFDC Integration I send out a call to an external application and receive a Success status in my debug log(I am logged in as myself). External application says they are getting multiple pings ...
-1
votes
1answer
353 views

Sample POST request to create case in sfdc from external System [closed]

I have a requirement to create a case in our organization from external services. So, I need the sample json post request to create a case in sfdc. And right now we are in classic edition. So, we ...
0
votes
0answers
74 views

Cross-domain REST callout from visualforce/apex to external website

I need to get data from the external website, preferably from Visualforce. I ran into some CORS issues. The URL for target website: https://geoportaal.maaamet.ee/url/xgis-latlon.php?lat=59....
1
vote
0answers
38 views

How to prevent VF Remoting from failing when there's no Referer header in the request?

I'm working on a ReactJS app served through a VisualForce page. If the initial request to the page containing the app doesn't include an HTTP Referer header, none of the requests sent to the page's ...
4
votes
1answer
91 views

How do I POST HTML Form Data coming from an externally hosted webpage to a Data Extension on Salesforce Marketing Cloud

I am trying to create a custom form on my organization's webpage, NOT a salesforce cloud landing page. How do I get this form to POST up to a SFMC data extension. Smart Capture Forms seem to only work ...
1
vote
1answer
64 views

Possible to make API GET calls directly with the browser?

Im following this documentation about report filters via URL: https://help.salesforce.com/articleView?id=reports_filter_url.htm&type=5 But treat this only as use case example. I want to clarify ...
0
votes
1answer
74 views

Convert Multile Objects to a single json

I have a list of map and list objects. These objects needs to be sent as json content in an http request. The objects are Map<String,String> leftFileParameters = new Map<String,String>()...
2
votes
2answers
299 views

POST request from Salesforce Apex Controller fails to setBody

The following code logs the correct JSON but in my web app that receives the request the body is empty: String body = ''; HttpRequest req = new HttpRequest(); HttpResponse res = new ...
2
votes
1answer
181 views

Sending batch rest api request from apex

I need to get multiple data from salesforce. To get the resource i call the endpoint as shown below. public String getData(Id docId) { HttpRequest request = new HttpRequest(); request....
1
vote
0answers
31 views

organisation inconsistencies - You have uncommitted work pending. Please commit or rollback before calling out

I have a fairly complex class dealing with http callouts. I have taken great care to avoid performing any dml operations before after all callout operations are complete. All of my callout operations ...
-3
votes
1answer
541 views

HTTP REQUEST HITTING TO LOCAL SERVER// [closed]

Can we hit a local/private server using IP address with HTTP request in Salesforce ?? or the server should always be public.... can we access a private IP address of local host/server using the HTTP ...
1
vote
0answers
56 views

Is there a way to do PATCH request with Marketing Cloud AmpScript or SSJS?

In Marketing Cloud AmpScript and SSJS, there is are no references for PATCH request. I wonder if we are able to make PATCH request? I'm trying to update a mobile connect record and I'm able to do so ...
0
votes
1answer
48 views

SOAP Request coming back OK - yet Automation is not starting

I'm attempting to run an automation via a form submission. The response to the post is {"StatusCode":200,"Response":[""]} - yet the automation is not running. The code for the post is: Platform....
2
votes
1answer
1k views

Multipart form data post file with multiple form parameters?

I am gone through this post and wanted to add one more form data parameter, but when I am sending a request that parameter it not getting posted into form data, please advise what I am missing. Here ...
0
votes
2answers
902 views

Calling a SOAP service through HTTP Request

This is a broad general question . We already have a SOAP callout in place where we are hitting the endpoint url after creating the request header and other necessary elements and hitting the method ...
0
votes
1answer
1k views

Not able to post data to Http with content type: application/x-www-form-urlencoded

I have tried with the below code but have received {"error":"invalid_request","error_description":"Missing parameters: password"} in response. I have tried with POSTMAN and getting correct response. ...
-2
votes
1answer
153 views

Test Class for the RemoteAction with HttpsRequest

Controller: global class GetcontentCalloutClass { public GetcontentCalloutClass(ApexPages.StandardController controller) {} public static Map<String, String> respStrings; global static ...
2
votes
0answers
46 views

Provide from apex code to external service session id, which does not invalidate on logout

In our application when user clicks at specific button on the page http callout to external service is triggered from apex code on the server side. As one of the parameters we are passing session id ...
1
vote
2answers
380 views

HttpRequest and HttpResponse is not covering in test class

I wrote a Testclass(Mock response) by implementing HttpCalloutMock interface to cover HttpRequest in class, I given some fake values to it also. But while calling the class, its not covering in ...
0
votes
1answer
203 views

Upload a file to External Systems (Document repository) with document metadata

I am trying to upload a file to external system (Veeva Vault) using visualforce and HTTPCallout. I was able to implement this with Postman but, unable to put the same in Apex. I get the below error ...
0
votes
1answer
57 views

bulk publish documents to external webservice through Apex HTTP callout

I am trying to build an utility to bulk publish documents through apex HTTPCallout. I dont want to read individual files from some visualforce page as this not feasible for bulk publishes. Rather want ...
8
votes
2answers
625 views

Does queueing a future method count as DML?

We need to implement the following pattern at my org: callout to external data source if that callout takes too long (according to some configurable threshold), log an error (ie do some DML) if that ...
0
votes
1answer
492 views

http request in a for loop

I need to do a callout to Google Analytics in Salesforce. Based on the documentation, I can't bulkify the request with the records involved, because I can only have one date range. Is doing a http ...
0
votes
1answer
103 views

HTTPGet response displayed in email

I wrote a rest service using cloud page. However, whenever i try to use it in an email, the response payload is not showing up correctly. I've tried treatascontent but same thing happens. http://www....