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
37 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 ...
0
votes
0answers
27 views

Http request with port [on hold]

I have a endpoint with port in it (http://example.com:8000/pageOne). This works fine when I call it from postman but when I do the same through anonymous window I am getting 503. Can someone tell me ...
1
vote
2answers
57 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
30 views

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

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
20 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
15 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
17 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
62 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
11 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
35 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
13 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
27 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
29 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
23 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
18 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
22 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
58 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
58 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
82 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
75 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
159 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
31 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
89 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
351 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
292 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
234 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
141 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
263 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
219 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
85 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
41 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
47 views

Response as HTML instead of XML [closed]

How to get response as XML for below URL URL
0
votes
1answer
168 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
232 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
163 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
26 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
521 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
373 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
580 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
167 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
88 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
454 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
95 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
58 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
99 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
97 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
78 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
364 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 ...