Questions tagged [http]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

Named Credentials - Merge Fields not Resolving

I am having an issue when attempting to reference the {!$Credential.UserName} and {!$Credential.Password} merge fields. I created a named credential with the following configuration: Identity Type:...
3
votes
1answer
468 views

Multipart Post to Attachment

I am trying to send a binary file in Java to Salesforce '/sobject/Attachment' endpoint. Below is the code I am trying to use, but I keep receiving a 400 error. Any idea as to what the solution is? ...
2
votes
2answers
954 views

TLS version and HTTP supported in production

We have not activated the update 'TLS1.1 for HTTPS' in our production org. So which version of TLS are right now supported by it? I mean does it support only TLS1.0 or it would support TLS 1.1? And ...
2
votes
1answer
1k views

Patch Method http callout from apex [duplicate]

I must use this patch http callout. Is any one has idea? http://developers.goformz.com/docs/update-an-existing-data-source-1 I get error "Invalid HTTP method: PATCH" Exception. In our project ...
0
votes
1answer
569 views

Consuming External Rest API in apex

I have a requirement where I have to consume external REST API. I have the URL for the same and the values for the parameters to be passed to get a response XML from the service. I am not getting how ...
0
votes
2answers
196 views

pass string value

In the Below requeststring, I have to pass one value from the post form data. For e.g: I have a user name text box and I need to pass that user name value on form submission in the below request ...
1
vote
1answer
2k views

Trigger to use HTTP callout and update record with the results

I have been trying to integrate Google Shortener API into my salesforce org. I wrote a class to make the call out, but am having difficulty bringing the value back into the record. I have a custom ...
2
votes
0answers
59 views

Fetch Data of Different Organization?

I have 2 Orgs- Org A & Org B both are ap1 Instance In Org A I've created a Connected app In Org B I am trying to Query accounts of Org A From the Connected App Through Http Call, but I am ...
0
votes
1answer
166 views

End Point URL Error in HTTP Class?

I have a 3rd Party Endpoint Url Which I Paste in browser Address bar I can see the XML Data. But the same Endpoint URL , I invoke via Apex Class (Http Call) I will get a Error Message From the System ...
3
votes
1answer
205 views

HTTP call using Salesforce

I am trying to rewrite the following Java HTTP request in Salesforce. String apiUrl = "url"; String wsUser = "YourWSUser"; String wsPassword = "YourWSPassword"; CredentialsProvider ...
0
votes
1answer
774 views

HTTP Post with redirect

So, I've got a HTTP Post that I am doing with two parameters. I'm not receiving any sort of session ID back to help me with the URL redirect. Apparently it is more of a 'post to this' and you're in. ...
2
votes
1answer
576 views

Salesforce and CURL

I am a new Salesforce developer. I got an assignment where I have to get connected to an API using developer_id;developer_key The documentation says, Developer authentication involved sending a ...
0
votes
1answer
246 views

Apex Batch Reduce Callout Process Time

From batch class we are able to connect to third party API 5times per second on an average, i am wondering is there any way to increase the callouts per second. I am sure there may be chances
1
vote
1answer
249 views

Use an http right frame instead of https on Login page

I wish to use an http right frame instead of https for my login page. However, it shows me, unable to do so as the website is http. Is there a way to add our right frame on the login page?
1
vote
1answer
1k views

Does HttpRequest.setClientCertificateName always send a certificate?

We are trying to use certificates to authenticate the client (Sales Force) calling our back-end system. However, as far as we can see, SalesForce is not sending any certificate. HttpRequest req = new ...
1
vote
0answers
67 views

Asychronous call to wordpress using HTTP callout failing due to timeout

Timeout error with Asychronous HTTP callout to wordpress site I am trying to make an asynchronous call to a wordpress site using HTTP callout method( using @Future). Everything works on sandbox and I ...
1
vote
1answer
571 views

405 response code when trying to callout to Google

Here is my code for callout. Http http = new Http(); HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); req.setEndpoint('https://google.com?q=...
1
vote
1answer
115 views

Pull specific content from HTTPGET request

Is there a way to only grab specific content from an HTTPGET request? For example, if the content I need for the email is contained within the <div id="the_content"> tag. <html> <...
1
vote
0answers
377 views

apex soap 1.2 call out

I am trying to do http callout with soap 1.2 request but facing following error..? Error - System.UnexpectedException: java.lang.IllegalArgumentException: invalid start or end. request:- ...
2
votes
1answer
280 views

What is http status code for API_DISABLED_FOR_ORG

I am debugging an issue with calling salesforce API and I need to know what is the http response status code for : "message":"The REST API is not enabled for this Organization.","errorCode":"...
20
votes
3answers
4k views

AWS Signature (version 4) in Apex

Over the past few days I have been struggling to create the AWS signature version 4 in Apex to send a request via query string, I have followed the step-by-step instructions for signing aws requests, ...
4
votes
0answers
267 views

OWASP Zap Report for scan Http request

Hi Friends , anyone heard about OWASP Zap Report ?? Scan request and response. i want create repohttps://eti-massemail.na24.visual.force.com/apex/MassEmail rt for one app of Salesforce. i face an ...
1
vote
1answer
635 views

Header names appear to be case-sensitive in HttpResponse

I've got NullPointerException trying to analyze the value of content type header returned in HttpResponse object. As it turns out, the case of the header name was different (i.e. 'content-type', but ...
1
vote
2answers
416 views

Uncommitted work pending from a non-DML access

I'm trying to upload documents to a third party server. This is what I've come up with currently. I got several methods to preprocess the upload process and after that I run a loop to upload the files....
0
votes
1answer
102 views

goto 3rd party link using SSO from Salesforce using HTTP Post

Can anyone help me with redirecting user to 3rd party server using SSO from SALESFORCE using Apex class using HTTP Post. Any links will also help.. Thanks
3
votes
1answer
11k views

HttpResponse body is empty even on successful request

I am doing a Http request to a web service and I get status 200 success. However when I try to read the response body (response.getBody()) it comes as empty. When I do response.toString() I get ...
1
vote
1answer
929 views

Error: Request Entity Too Large: head I get this error Intermittently

I have tried reproducing this error and have no been able to on a regular basis I have allot of cookies but there small so don't think that's it. Also I notice that the refereed header from sales ...
2
votes
1answer
1k views

Iframe won't load on Salesforce1

All I'm trying to do is load an iframe on a click on the main image and then a click on the header of the iframe reloads the main image. However, this isn't working on Salesforce 1 becuause: [...
0
votes
3answers
40 views

return url asking for login details?

Hi I have the below URL the return argument at the end is successfully retuning the user to sf and to the opportunity but it is asking for login details each time How can I stop this? http://...
2
votes
1answer
498 views

How do you find the Jitterbit Harmony Http HostedEndpoint SERVERNAME & PORT combination?

I'm sending an outbound message from SFDC to Jitterbit. The Jitterbit "NO-Cumentation" http://support.jitterbit.com/documentation/How-to-Create-a-Hosted-HTTP-Endpoint states: ... "the end-point ...
2
votes
2answers
198 views

Loading HTTP resource in Visualforce pages

Is there a way to allow loading of non secure resources from external sites in Visualforce pages? Below is the scenario I have. I am creating a force.com site page. The template I received for the ...
6
votes
1answer
8k views

What is the difference between webservice and HTTP service?

What is the difference between webservice and HTTP service? I have used HTTP service with REST api. But not able to understand what do we use webservice keyword and what is the difference between ...
1
vote
1answer
67 views

Access “Anyone with link” properties (and link) using REST API

I have an attachment with "Anyone with link" sharing configuration. How can I retrieve (or construct) the actual sharing URL using the rest API? E.g., I have an attachment with id: 069240000009bdU ...
4
votes
2answers
3k views

Cannot find Data Extension by external key.

I am getting the response from https://www.exacttargetapis.com/hub/v1/dataevents/BBDD0F10-94A1-4CD6-B7A2-32FEB671E44F/rowset { "message": "Unable to locate data extension with ID bbdd0f10-94a1-...
0
votes
1answer
3k views

How to fix HTTP method DELETE doesn't support output

This would be a duplicate, but I really need a good solution. I have tried to research but failed to find anything. Not to complicate, I know it is easy if I just used a GET method, but I needed to ...
2
votes
2answers
603 views

Perform crazy SOAP invocation using HTTP GET

Some REST endpoints do support the use of _HttpMethod override parameter: If you use an HTTP library that doesn't allow overriding or setting an arbitrary HTTP method name, you can send a POST ...
3
votes
1answer
316 views

System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out in test class

I am facing this issue in a MockCallOut for http in test class. I know that a dml is not allowed just above the callout, so I have tried to put callout between Test.startTest() and Test.StopTest(); I ...
21
votes
2answers
9k views

How can I make a PATCH HTTP Callout from Apex?

I need to make a PATCH http request. I made the rather incredible discovery today that I can't set an HttpRequest to use the PATCH method, as when sending the request I get a callout exception: ...
1
vote
1answer
38 views

What are the configurations in Salesforce for client to access the Rest Service with http instead of https

I have a Rest service(POST) that I expose publicly through sites. What are the configurations required in Salesforce for client to access the Rest Service with http instead of https.
10
votes
1answer
5k views

apexrest: controlling HTTP error codes on exceptions

Is it possible to control what HTTP error code apexrest returns when an exception occurs in the code? By default it returns a 500 error and a developer who's working on the system that's consuming ...
0
votes
1answer
267 views

In an internal SFDC Http Get from a VF Page, how do I authenticate for the redirected URL?

I'm trying to execute an internal http: GET from a VF page on a Knowledge Article so that I can parse the response HTML for some text in the page. (The Knowledge article looks like this: https://...
1
vote
3answers
985 views

Using Batch APEX to generate template body dynamically with merge field values

I am using Amazon SES to send mails to the all opportunities using batch apex with the body of email template. I'm using the solution proposed in an answer to Using APEX to assemble HTML Letterhead ...
0
votes
1answer
2k views

How to send Empty field value as blank (Not Null)

Apex Code: List<order_batch__c> bcList = new List<order_batch__c>(); bcList= [select Or_invoiceadd1__c,Or_invoiceadd2__c,Or_invoiceadd3__c,Or_invoiceadd4__c from order_batch__c ...
3
votes
1answer
730 views

Anchors stripped from VF pages in server-side redirects?

I'm unable to get a VF page to load with an anchor in the URL if I redirect server-side. After clicking a button, I'm doing a DML operation and redirecting to a VF page. In the redirect, I'd like to ...
0
votes
1answer
1k views

Send Response back to same url after receiving data from callout

Http http = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint(EndpointUrl); req.setMethod('POST'); req.setBody(xmlstring); req.setHeader('Content-Type', 'application/xml'); ...
1
vote
1answer
1k views

HTTP Post issue - unable to redirect when authenticated

We are experiencing an issue with our HTTP Post method. We have the need to POST some information to an external server. We have created some code in visualforce to do this for us but it seems to only ...
8
votes
1answer
798 views

HTTP Callout Problems in Pre-release

I am running the same code in two different environments and I am getting different results. I have the following code hitting the REST API exposed on StackExchange: Http httpQuestions = new Http(); ...
2
votes
1answer
483 views

Twitter Integration getting error Failed to validate oauth signature and token

i am trying to implement twitter authorization in my salesforce app.in first step i am trying to get request token from twitter.here is my code : public String getTwitterReqToken(){ ...
18
votes
2answers
18k views

String length exceeds maximum: 6000000

Are there any work arounds for this issue? I'm trying to upload a file(attachment) to an 3rd party REST API Service. It works fine until my file sizes get about ~5 mb. Then I start getting the ...
11
votes
3answers
3k views

How to use HTTPGet variable in URL (ExactTarget)?

Been trying to figure out a way to pass in the variable into a HTTPGet function for long time now. How to do it? Here's what I have so far, but it doesn't return anything. <p id="date" style="...