12 votes

Easily download SE posts as notebooks?

Here is an approach, not battle tested, YMMV. It depends on the new body_markdown parameter in the SE API responses. From there we can use whatever MD->NB tool ...
  • 45.7k
9 votes
Accepted

How to import a ByteArray from GenerateHTTPResponse?

One needs to be careful and construct the HTTPResponse properly before we ask GenerateHTTPRespone to produce the final thing so ...
  • 14.4k
9 votes
Accepted

Bug with Json payload with diacritics for HTTPRequest

ExportString JSON produces UTF8 encoded json string, if put as HTTPRequest body it will undergo another encoding unless you prevent it with an option: ...
  • 133k
8 votes

Bug with Json payload with diacritics for HTTPRequest

I've had luck using the functions WriteRawJSONString and ReadRawJSONString from Developer ...
  • 10.7k
6 votes

How can I find what UserAgent gets attached to my URL requests?

If you have the ability to CloudDeploy functions, you can do it like so: ...
  • 12.7k
6 votes
Accepted

How to get URL request response in Mathematica?

It looks like this particular request requires you to set a header or two before it will respond the same way it does in the browser. In particular, it looks like it needs you to set the ...
  • 12.7k
6 votes
Accepted

"Accept" header in HTTP request for DOI Content Negotiation

It seems you are trying to profit from DOI Content Negotiation described here. Content negotiation allows a user to request a particular representation of a web resource. DOI resolvers use ...
  • 31.2k
5 votes
Accepted

Curl analog with URLRead/Execute?

To keep this example self-contained, we will use the HTTP introspection service at https://httpbin.org. This is a very handy site for verifying and debugging HTTP transactions. First we will create a ...
  • 67.5k
4 votes
Accepted

How can I find what UserAgent gets attached to my URL requests?

HTTPRequest[""]["Headers"] {"user-agent" -> "Wolfram HTTPClient 12.3"} or ...
  • 133k
4 votes

Bug with Json payload with diacritics for HTTPRequest

For what it's worth, the issue is in how ExportString is handling the diacritics. We can see that it botches them, but the function being used under the hood doesn'...
  • 45.7k
3 votes

Accessing Nutritionix API

This request works: ...
  • 69k
3 votes

"Accept" header in HTTP request for DOI Content Negotiation

...
3 votes

How can I deal with a 502 error?

Alright, I got into contact with the support for the API, and the problem was resolved on their end. Apparently, it was an error in the routers' networking configuration.
  • 1,397
3 votes
Accepted

Should HTTPRequest return the same as curl in this case

The curl request is passing the arguments as a form body, but the Mathematica expression is passing query arguments in the URL. Try changing the request property ...
  • 67.5k
3 votes
Accepted

Basic API Key authentication not working with URLExecute

We will generate our own Authorization header, because this API uses a slightly obtuse method. The API uses what's known as "Basic Authentication", which is ...
  • 12.7k
2 votes
Accepted

Cannot submit valid form in FormFunction

As @Kuba had commented, ImportString[#, "HTTPRequest"]& does not turn POST parameters to rules. So the property "FormRules", ...
2 votes

Using HTTPRequest "Method"->"PUT" with photos in AWS S3

The problem is with my content hash not matching the AWS calculated hash (as you can see in the response from AWS). I didn't figure out how to get them to match, but I found an option in the AWS ...
2 votes
Accepted

How do I execute HTTPRequest with Binary Data?

Caveat: I do not have a SalesForce account and have not tried this code against the real site. But it works against the testing site https://httpbin.org/anything. For this example we will create ...
  • 67.5k
1 vote

How to obtain stock information from a website

I do not think it is possible as it looks like TradingView has blocked scraping so Import does not work. You can try the inbuilt function ...
1 vote

Curl analog with URLRead/Execute?

curl is different from the built-in Curl. curl is a command-line tool and library for transferring data with URLs. This aks for a Mathematica built-in or a call to ...

Only top scored, non community-wiki answers of a minimum length are eligible