Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
15 views

When using the Favorite API to get all the favorites for the current user it returns as Http Response the Code: 302, Status: Moved Temporaly]?

I am using as reference this documentation: https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_favorites.htm And it says that by doing an HTTP GET request to this url ...
2
votes
1answer
36 views

Read Time Out - First HTTP request - rest

Http request using restAPI : public static String sendFormHttp(Opportunity opportunity, List<Easy_Send_Form_Mapping__mdt> mappingList, Map<String, String> systemVariableMap){ ...
3
votes
1answer
45 views

Display PDF with Visualforce using Lightning Experience

Is this post still valid as a solution to download a pdf from third-party site, then displaying it in a Visualforce page? This is what I'm doing in my code: Visualforce page <apex:page ...
0
votes
1answer
42 views

caseId property is not shown in response received from a external service to Salesforce [closed]

I am making a POST callout from salesforce to another service and case is one of the objects of JSON which i am sending (see below) "case": { "caseId": "00000212", "status":"", "statusReason"...
1
vote
1answer
43 views

Aura Component + HttpCallout + Large File Response

Trying to figure out how best to build interfaces that retrieve external files between 1-10 MB and display them in the UI. Right now I have a Lightning Aura Component that calls a web service via ...
1
vote
0answers
46 views

HTTP CalloutException in Summer '19 sandboxes

Yesterday I started experiencing intermittent but frequent errors with HTTP callouts using Named Credentials in Apex in multiple sandboxes (all Summer '19 preview instances). These same callouts had ...
0
votes
0answers
32 views

Bulk API 2.0 Close Request Failing - Cannot specify query parameters in the resource

I am doing a POC on the BULK API and have run through this trailhead: https://trailhead.salesforce.com/en/content/learn/modules/api_basics/api_basics_bulk where you call the BULK API through WorkBench....
0
votes
1answer
49 views

HTTP request to return a list of Contacts

I would like to change the following method within this class: public class ApexCalloutsDemo { public static HttpResponse makeCallout() { Http http = new Http(); HttpRequest ...
1
vote
2answers
76 views

API requests calculation on a bulk upsert costing 6 calls

I am using the simple-salesforce Python package to upsert records into our Salesforce instance. I am finding that each bulk API call counts as 6 API requests. Is this correct? Is there a way to reduce ...
1
vote
0answers
36 views

HTTP GET Response with 204 Status Code and blank Body [closed]

I send Callout request to ActiveMq messages queue service to get messages form there and handle it in Salesforce. In the Queue there are 3000 messages. When I send the request from salesforce sometime ...
0
votes
1answer
23 views

Is a Request possible without a Response Status?

Utilizing a custom salesforce connect adapter, callouts are being made using the HTTPRequest and HTTPResponse classes. 40,000 requests to these webservices are being made and all but a few (2-5) are ...
0
votes
0answers
18 views

Redirect from visualforce with basic authorization header

Is it possible to send a Basic Authorization header from a visualforce page and redirect a user to a different non-sf site? If not any way on how I can do this? I was able to send a HTTPRequest with ...
0
votes
2answers
39 views

Rest API Composite - Error 302

I am using Composite API to get the opportunity record but facing 302 error { "compositeRequest" : [ { "method" : "GET", "url" : "/services/data/v42.0/query/?q=select+id,...
0
votes
2answers
168 views

System.HttpResponse[Status=Unauthorized, StatusCode=401] from Apex Controller

I have the following code, that retrieves picklist values dependent on a record type: public static List<String> getPicklistValuesByRecordType(String objectType, String recordTypeId, String ...
0
votes
0answers
16 views

What are all the options to send a file via http?

The documentation (look at the SendFax service method) for this API I'm using is not clear on how to send the actual document. Here is the java code example they used to send the file: package com....
0
votes
1answer
42 views

Integration that involves encryption

I've done quite a few JSON/REST integrations and only two SOAPs, but this API I'm working with looks like neither. They do offer example code. I stuck with the java example because that is what I've ...
1
vote
0answers
15 views

How to configure HTTP request headers for a Canvas app

I’m trying to create a Canvas app where the URL is served by a CDN. Salesforce is setting 'cache-control: no-cache' in the request header and this is causing the request to fail with status 403 along ...
0
votes
0answers
29 views

Uploading CA-Signed CRT to Salesforce?

I have an existing CA-Signed Certificate (CRT) given to me by my client, and it is needed to be able to make callouts to their external system. I have not found a way to be able to upload a CRT to ...
0
votes
2answers
31 views

Catch block code coverage for @HttpPost and @HttpGet REST API

I have some code in my catch block for both @Post and @Get methods. I need to cover catch block to get to 75% for GET, got catch block covered for POST Here is an example : // POST my JSON : [ ...
0
votes
0answers
31 views

Getting Bad Request from Post request to SharePoint Rest API from APEX

Hi i am doing a post request for delete a folder in sharepoint from salesforce i am using below code string Authorization = 'Bearer ' + spa.basicAuthCallOut(); HttpRequest req = new HttpRequest(); ...
0
votes
0answers
29 views

Having comma in HTTP endpoint using Named Credential causes exception

We have special requirement from customer that url parameter is specified like this: "www.example.com,timeoutSec=120", where www.example.com is defined using named credential. We receive following ...
0
votes
0answers
27 views

How to Log Complete HTTP Request

I am trying to capture an HTTP request in it's entirety as it is sent from salesforce. After adding headers my request I have attempted to use JSON.serialize and String.valueOf, where as JSON....
0
votes
2answers
111 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
109 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
166 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
125 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
206 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
34 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
117 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
595 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
499 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
475 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
164 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
537 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
266 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
136 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
57 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
52 views

Response as HTML instead of XML [closed]

How to get response as XML for below URL URL
0
votes
1answer
205 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
285 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
203 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
30 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
620 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
556 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
783 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
191 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
104 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
95 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
528 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 ...